fablabbcn / smartcitizen-api

The Smart Citizen Engine
https://developer.smartcitizen.me
GNU Affero General Public License v3.0
10 stars 4 forks source link

Cassandra / Kairos connection #260

Closed oscgonfer closed 7 months ago

oscgonfer commented 9 months ago

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

oscgonfer commented 8 months ago

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

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
pral2a commented 8 months ago

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:
  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