In this blog, we are going to install DC/OS on CentOS in OpenStack Virtual Machine. There are three way to install DC/OS in Virtual Machine.
1. An automated GUI installer
2. An automated, configurable CLI installer
3. An advanced installer with semi-manual steps.
In this blog, we will going for first option, GUI installation. The automated GUI installer provides a simple graphical interface with click able links. This automated installer provides us a basic installation that is suitable for demonstrations and POCs. Only.
For this installation, we are going to create one Master and Three Agent(Slaves), we also need one bootstrap node for the administer the DC/OS installation across our cluster cluster. The bootstrap node uses an SSH key to connect to each node in our cluster to automate the DC/OS installation.
The DC/OS installation creates these folders:
/opt/mesosphere : Contains all the DC/OS binaries, libraries, cluster configuration. Do not modify.
/etc/systemd/system/dcos.target.wants : Contains the systemd service units which start the things that make up DC/OS. They must live outside of /opt/mesosphere because of systemd constraints.
Various units prefixed with dcos in /etc/systemd/system : Copies of the units in /etc/systemd/system/dcos.target.wants. They must be at the top folder as well as inside dcos.target.wants.
1. Install DC/OS
$ curl -O https://downloads.dcos.io/dcos/EarlyAccess/dcos_generate_config.sh
2. From your terminal, start the DC/OS GUI installer with this command.
$ sudo bash dcos_generate_config.sh –web
Here is an example of the output.
Running mesosphere/dcos-genconf docker with BUILD_DIR set to /home/centos/genconf
16:36:09 dcos_installer.action_lib.prettyprint:: ====> Starting DC/OS installer in web mode
16:36:09 root:: Starting server (‘0.0.0.0’, 9000)
Tip: You can add the verbose (-v) flag to see the debug output: $ sudo bash dcos_generate_config.sh –web -v
3. Launch the DC/OS web installer in your browser at: http://:9000.
4. Click Begin Installation.
5. Specify your Deployment and DC/OS Environment settings:
Master Private IP List : Specify a comma-separated list of your internal static master IP addresses.
Agent Private IP List : Specify a comma-separated list of your internal static agent IP addresses.
Master Public IP : Specify a publicly accessible proxy IP address to one of your master nodes. If you don’t have a proxy or already have access to the network where you are deploying this cluster, you can use one of the master IP’s that you specified in the master list. This proxy IP address is used to access the DC/OS web interface on the master node after DC/OS is installed.
SSH Username : Specify the SSH username, for example centos.
SSH Listening Port : Specify the port to SSH to, for example 22.
SSH Key : Specify the private SSH key with access to your master IPs.
DC/OS Environment Settings
Upstream DNS Servers : Specify a comma-separated list of DNS resolvers for your DC/OS cluster nodes. Set this parameter to the most authoritative nameservers that you have. If you want to resolve internal hostnames, set it to a nameserver that can resolve them. If you have no internal hostnames to resolve, you can set this to a public nameserver like Google or AWS. In the example file above, the Google Public DNS IP addresses (IPv4) are specified (18.104.22.168 and 22.214.171.124).
Caution: If you set this parameter incorrectly you will have to reinstall DC/OS. For more information about service discovery, see this documentation.
IP Detect Script : Choose an IP detect script from the dropdown to broadcast the IP address of each node across the cluster. Each node in a DC/OS cluster has a unique IP address that is used to communicate between nodes in the cluster. The IP detect script prints the unique IPv4 address of a node to STDOUT each time DC/OS is started on the node.
Important: The IP address of a node must not change after DC/OS is installed on the node. For example, the IP address must not change when a node is rebooted or if the DHCP lease is renewed. If the IP address of a node does change, the node must be wiped and reinstalled.
6. Click Run Pre-Flight. The preflight script installs the cluster prerequisites and validates that your cluster is installable. For a list of cluster prerequisites, see the scripted installer prerequisites. This step can take up to 15 minutes to complete. If errors any errors are found, fix and then click Retry.
Important: If you exit your GUI installation before launching DC/OS, you must do this before reinstalling:
SSH to each node in your cluster and run rm -rf /opt/mesosphere.
SSH to your bootstrap master node and run rm -rf /var/lib/zookeeper
7. Click Deploy to install DC/OS on your cluster. If errors any errors are found, fix and then click Retry.
Tip: This step might take a few minutes, depending on the size of your cluster.
8. Click Run Post-Flight. If errors any errors are found, fix and then click Retry.
Tip: You can click Download Logs to view your logs locally. Tip: If this takes longer than about 10 minutes, you’ve probably misconfigured your cluster. Go checkout the troubleshooting documentation
9. Click Log In To DC/OS. If this doesn’t work, take a look at the troubleshooting docs
You are done!