Deploying multiple instances of a service

Control Center can not deploy more than one instance of an application that includes virtual host names, unless the virtual host names are unique. Follow this procedure to modify an application service template and deploy multiple instances of an application.
  1. Log in to the Control Center master host as a user with read and write privileges in /opt/serviced/templates.
    • For Ubuntu hosts, log in as a user with sudo privileges.
    • For RHEL or CentOS hosts, log in as root.
  2. Change directory to the Control Center templates directory, and copy the template file to modify.
    cd /opt/serviced/templates
    sudo cp App-Template.json App-Template-Copy.json
  3. Use a text editor to make the following changes to the new service template file:
    1. Optional: Change the value of the Name field on line 3.
      This change differentiates application service templates.
    2. Change the values of the defined VHosts fields in all subservice Endpoints objects.
  4. Use serviced to add the modified template.
    sudo serviced template add App-Template-Copy.json
  5. Log in to the Control Center web interface, and deploy the new application.