docs/docker-for-ibm-cloud/scaling.md

1.7 KiB

description keywords title
Scale your swarm stack ibm cloud, ibm, iaas, tutorial Modify your Docker EE for IBM Cloud swarm infrastructure

Scale workers

Before you begin:

Steps:

  1. Connect to your Docker EE for IBM Cloud swarm. Navigate to the directory where you downloaded the UCP credentials and run the script. For example:

    $ cd filepath/to/certificate/repo && source env.sh
    
  2. Note the name of the cluster that you want to scale:

    $ bx d4ic list --sl-user user.name.1234567 --sl-api-key api_key
    
  3. Note the manager leader node:

    $ docker node ls
    
  4. Get the public IP address of the leader node, replacing my_swarm with the swarm you want to scale:

    $ bx d4ic show --swarm-name my_swarm --sl-user user.name.1234567 --sl-api-key api_key
    
  5. Connect to the leader node using the leaderIP you previously retrieved:

    $ ssh docker@leaderIP -p 56422
    
  6. Use InfraKit to modify the number of swarm mode cluster resources. For example, the following commands set the target number of worker nodes in the cluster to 8. You can use the same commands to reduce the number of worker node instances.

    $ /var/ibm/d4ic/infrakit.sh local stack/vars change -c cluster_swarm_worker_size=8
    $ /var/ibm/d4ic/infrakit.sh local stack/groups commit-group file:////infrakit_files/defn-wkr-group.json