fablabbcn/smartcitizen-api

Cassandra / Kairos connection

oscgonfer opened this issue · 2 comments

As we are moving services to different geographical locations, we need to check that the connection between Kairos and Cassandra via SSL is possible.

Continues here. Two options to discuss for moving forward (@timcowlishaw @pral2a):

  • Migrate partially (only api) and keep cassandra machine as is (see risk aspect)
  • Launch new machine in current datacenter for upgrade of api, and then consider moving both, api and dc over to new location (preferred)

Below some notes in case we opt for a remote connection.

Connecting Kairos and cassandra remotely

Should we choose to migrate and use remotely between kairos and the datacenter:

Kairos configuration

No issues (that I see) in the configuration file for Kairos: https://raw.githubusercontent.com/kairosdb/kairosdb/develop/src/main/resources/kairosdb.conf

SSL in Cassandra

I believe this is not enabled on our machine: Setting up SSL on cassandra connections
http://docs.datastax.com/en/developer/java-driver/3.1/manual/ssl/

I case we choose to do it in London already, we should consider this.

Migrating Cassandra Machine

Migrating from one machine to another: https://www.linode.com/docs/products/compute/compute-instances/guides/migrate-to-different-dc/

Possible issues

Any existing Backups created through our Linode Backup Service will not be migrated. Once the Compute Instance’s migration has completed, your backup service will restart on its normal schedule.

@pral2a this I believe is quite critical point to consider at this moment of the project. VLANs are datacenter specific.

I suggest we only do it in stages:

  1. Launch machine for API in current datacenter
  2. Do all dev effort, currently ongoing on that machine
  3. Move both, api and cassandra over to new location once we also have better information of final architecture, with Kafka

Here are some suggestions to address the Cassandra topic:

  1. My primary suggestion is to follow the Linode migrate to another data centre guide. We could follow some risk management actions such as:
  • Clone the existing instances to have a backup in case the newly transferred instance has some issues
  • Download a disk image over SSH to have a backup
  • Ask @paulormg (our Cassandra expert) to help us backup data and configuration previous to the migration
  1. Consider requesting support from @paulormg (our Cassandra expert) to bootstrap the Cassandra machines in the new data centre from the ground up in case we could benefit from a significant upgrade. I will favour this option less because of the complexity it involves.
  2. Postpone any migration and keep Cassandra in the existing data center. Consider setting a point-to-point VPN to secure the connection if the SSL option is not feasible. i.e. WireGuard