Adding a New Server

The following are instructions for adding a new server in order to expand cluster size/capacity.

  1. First, ensure that you have all of Ansible’s original settings (including the generated files). The master jwt will also need to be common between all nodes. Note that you should "cd" into the directory where you extracted light-app.
  2. Edit the Ansible inventories files (hosts, /host_var/server##.yaml). Create a new server##.yaml for a new target. Append the new server to the three sections in the hosts file: in the top section, in [duros_nodes], and in [etcd]. The hosts file must contain all of the other nodes of the cluster under [etcd] that already exist, in order to recognize which cluster it should be added to.
  3. Run the ansible-playbook with the same parameters as before, and add the following parameter: --limit:<new_server name>.
  • When adding servers, only one server can be added at a time.
  • Only currently added nodes in the cluster and a single new node can be outlined within the hosts file.

Example if Deployed via Ansible

Bash
Copy

Run the above command from the directory where light-app was extracted, such that relative paths provided for the hosts and deploy-lightos.yml files are accessible.

This command relies on the jwt files and the lightos-certificate directory that were created during deployment, to be located in ~ ($HOME).

Example if Deployed via Docker and Ansible

Note that the following command must be run within Docker.

Bash
Copy
  • Verify that the Docker URL is correct. Refer to your Customer Installation Addendum for additional information.
  • This is similar to deploying a new cluster, but limiting it to a single server with the last three arguments.
  • Set the ANSIBLE_LOG_PATH to where you want the Ansible to log to.
  • playbooks/deploy-lightos.yml should point to a playbook.
  • The certificates directory should point to the directory where the cluster certificates are located inside the Docker container (the main installation created these).
  • The inventory should point to an existing hosts file, where the new server information exists (note that original servers in that cluster can optionally be there too).
  • Note that new_server should be the friendly name from the first column in the hosts file (so of the format serverXX, and not the hostname or IP).
  • The 'pwd' command above extracts the full path name of the Ansible directory.
  1. Once the installation is finished, the new server will be rebooted. The new etcd will sync with the existing cluster, and the cluster should be extended automatically.

Cleaning Up a Failed Server Add

If the server addition failed or you have a corrupted server, and you want to remove it and re-add it to the cluster, follow these steps:

  1. First, run cleanup playbook on this server and add the following parameter: --limit <new_server>, to clean all Lightbits metadata and software from this server.

Example

Bash
Copy

Do not use this to remove an existing healthy server. It should only be used to clean up a server that failed to be added.

  1. Enter etcdctl member list to get the ID of the server that failed to add, and then enter etcdctl member remove <new_server_id> to remove it from the etcd database.
  2. After addressing any remaining issues, repeat the steps above to add a new server.
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard