Install MSR online¶
The procedure provided herein will guide you in your installation of MSR onto a Swarm cluster that has one manager and one worker node, with the MSR installation occurring on one worker. Be aware, though, that you can adjust the number of nodes to fit your specific needs.
Important
Mirantis recommends that you:
Install MSR on an odd number of nodes. To bypass the recommendation check in the apply command, add the --force option.
Install MSR on worker nodes only.
Note
You can configure settings either in the YAML file or as command-line flags during installation. If the same setting is defined in both, the command-line flag takes precedence.
If you have not done so, create the swarm where MSR will run.
Enable all authenticated users, including service accounts, to schedule services and perform tasks on all nodes.
Note
If you are using MSR in conjunction with MKE, refer to Schedule services deployment on manager and MSR nodes for detailed information.
SSH into the manager node.
Generate the
values.ymlfile that you will use to configure and deploy MSR:docker run -it --rm \ --entrypoint cat registry.mirantis.com/msr/msr-installer:<msr-version> \ /config/values.yml > values.yml
Edit the
values.ymlfile to customize your MSR deployment.Place your license in the
licensesection.license: '<license-string>'
You can supersede the default MSR password, which is
password, by adding theenzi.adminPasswordparameter to thevalues.yamlfile:enzi: adminPassword: "<my-password>"
Obtain a list of non-manager nodes along with their node IDs:
docker node ls --format "{{ .ID }}" --filter "role=worker"
In the
swarm.nodeListsection of thevalues.ymlfile, add the node IDs of the worker nodes on which you plan to install MSR:swarm: nodeList: - <node-id-1> - <node-id-2> - <node-id-3>
Execute the apply command to install MSR:
docker run \ --rm \ -it \ -v /var/run/docker.sock:/var/run/docker.sock \ -v <path-to-values.yml>:/config/values.yml \ registry.mirantis.com/msr/msr-installer:<msr-version> \ apply \ --https-port 8443 \ --http-port 8888
Note
For MSR 3.1.4 or earlier use the install command instead of the apply command.
If you do not specify any worker nodes on which to install MSR, the process fails. You must specify at least one node within
swarm.nodeListto indicate the node thatmsr-installershould use.You must specify the destination file in the destination container as
:/config/values.yml \. Any other name will cause the container deployment to fail, which will result in the cluster becoming inoperable.To switch the log-level from the default
infotodebug, you must insert the--log-level debugflag between themsr-installerimage and theapplysubcommand. To modify the log-level of the containers that will be deployed, uselogLevelwithin thevalues.ymlfile.Port 8443 is indicated in the provided example, demonstrating a scenario in which MKE and MSR are both in use and have a conflict with port 443. Port 443 should be used exclusively for all other installation configurations.
To configure the host or load balancer URL for accessing MSR, use the
--external-urlflag at the time of installation or upgrade. You can use the flag alongside such options as--https-portor--http-port, for example--external-url msr.example.com. Alternatively, the external URL can be configured in thevalues.yamlfile by setting the value to theglobal.externalURLfield.
Optional. Use a load balancer to expose services externally in the swarm. MSR on Swarm relies on Ingress load balancing. Refer to the official Load balancing documentation for more information.
Review the status of the deployed services:
docker stack services msr
Access the MSR web UI at
https://<node-ip>:443. The default username and password areadmin:password.