Migrating from Single Node
If you are already running a Cells instance on a mono-node server, you may want to improve its availability and scalability by replicating it to a multi-node cluster.
Prerequisites¶
You must first make sure to upgrade Cells to at least version 4.
We also assume that you have read the previous sections of this chapter:
- Going Stateless provides an overview of our clustering concepts,
- Configuring with URLS explains how to point Cells configuration toward the correct underlying services,
- External Services explains how to set up all required cluster third-party services that will allow easy replication of the Cells image.
Migrating on-file services data from Bolt/BleveDB to MongoDB¶
If you are already running a Cells V4 (or later) version with MongoDB, you can skip this section.
The first dataset that must be made portable accross images is all the services-generated data that are stored on file-based DBs: parsed logs, audit data, activities, etc... This can be achieved by copying all these in a Mongo database and reconfiguring services to point to Mongo.
To do that, simply use the following command :
$> cells admin config db add
When prompted, choose 'NoSQL' database type and enter the MongoDB connection string (hostname, port, database name, etc).
You can test this migration by starting Cells as usual with ./cells start
. Everything should work as expected.
Still, the pydio.grpc.search engine is not migrated, and you have to manually trigger a full re-indexation of the search engine, with ./cells admin resync --service pydio.grpc.search
. After that operation is finished, try to search something in the search engine, you should find correct results.
Migrating configuration data from json to ETCD+VAULT¶
The other dataset to migrate from local filesystem to the external storages are all config-related. For that, you will use ./cells admin config copy
that expects --from and --to parameters in the URL form.
Run CELLS_DISPLAY_HIDDEN_FLAGS=true ./cells start --help
to look at the default URLs used for --config
, --certs_store
, --keyring
and --vault
.
1 - Copy configs from JSON to ETCD:
Warning, do not confuse cells vault (which is simply an encrypted config) with Hashicorp Vault (which is a secrets storage that we use to store the keyring).
Queues: no need to migrate¶
As explained in the previous pages, in cluster mode, you must rather rely on NATs Jetstream for the persisting queues. Yet, we assume that you are not doing the migration from the single node to cluster while large jobs are still running in the server. Thus, you should not have to bother to migrate existing queues from the local file system to NATS Jetstream.
To start nats with jetstream enabled, you can also use the -js,--jetstream
and -sd,--store_dir <dir>
flags from the command line:
Starting Cells with the new parameters¶
Once all configurations are live in ETCD and Vault, you can now set up Cells runtime using flags or environment variables: