You can install and run DC/OS services on a datacenter without Internet access by using a local Catalog. You can deploy a local Catalog that includes all Certified packages (basic), or a local Catalog that includes selected packages (advanced).
Prerequisites:
-
Logged into the DC/OS CLI. On DC/OS Enterprise, you must be logged in as a user with the
dcos:superuser
permission.
Certified Catalog packages
This section explains how to deploy a local Catalog containing certified Catalog packages.
-
From a terminal prompt, use the following commands to download the local Catalog and its service definitions onto your local drive.
curl -v https://s3.amazonaws.com/downloads.mesosphere.io/universe/public/local-universe.tar.gz -o local-universe.tar.gz curl -v https://raw.githubusercontent.com/mesosphere/universe/version-3.x/docker/local-universe/dcos-local-universe-http.service -o dcos-local-universe-http.service curl -v https://raw.githubusercontent.com/mesosphere/universe/version-3.x/docker/local-universe/dcos-local-universe-registry.service -o dcos-local-universe-registry.service
-
Use secure copy (scp) to transfer the Catalog and registry files to a master node, replacing
<master-IP>
with the public IP address of a master before issuing the following commands. (You can find the public IP address of a master in the top left corner of the DC/OS UI.)scp local-universe.tar.gz core@<master-IP>:~ scp dcos-local-universe-http.service core@<master-IP>:~ scp dcos-local-universe-registry.service core@<master-IP>:~
-
SSH into the master using the following command. Replace
<master-IP>
with the IP address used in the previous commands.ssh -A core@<master-IP>
-
Confirm that the files were successfully copied.
ls
You should see the following files listed.
dcos-local-universe-http.service dcos-local-universe-registry.service local-universe.tar.gz
-
Move the registry files into the
/etc/systemd/system/
directory.sudo mv dcos-local-universe-registry.service /etc/systemd/system/ sudo mv dcos-local-universe-http.service /etc/systemd/system/
-
Confirm that the files were successfully copied into
/etc/systemd/system/
.ls -la /etc/systemd/system/dcos-local-universe-*
-
Load the Catalog into the local Docker instance. This may take some time to complete.
sudo docker load < local-universe.tar.gz
-
Restart the
systemd
daemon.sudo systemctl daemon-reload
-
Enable and start the
dcos-local-universe-http
anddcos-local-universe-registry
services.sudo systemctl enable dcos-local-universe-http sudo systemctl enable dcos-local-universe-registry sudo systemctl start dcos-local-universe-http sudo systemctl start dcos-local-universe-registry
-
Use the following commands to confirm that the services are now up and running.
sudo systemctl status dcos-local-universe-http sudo systemctl status dcos-local-universe-registry
Configuring multiple masters
If you only have one master, skip to Linking local Catalog to master below. If you have multiple masters, continue with the following procedure.
-
Use the following command to discover the private IP addresses of all of your masters. Identify the private IP address of the master you are SSHed into right now from the list. It will match the path shown after
core@ip-
in your prompt, where the hyphens become periods.host master.mesos
-
Use secure copy to transfer the Catalog and registry files to one of the other masters. Replace
<master-IP>
with the IP address of the other master.scp local-universe.tar.gz core@<master-IP>:~ scp /etc/systemd/system/dcos-local-universe-registry.service core@<master-IP>:~ scp /etc/systemd/system/dcos-local-universe-http.service core@<master-IP>:~
-
SSH into the master that you just copied these files to.
ssh -A core@<master_IP>
-
Confirm that the files were successfully copied.
ls
You should see the following files listed.
dcos-local-universe-http.service dcos-local-universe-registry.service local-universe.tar.gz
-
Move the registry files into the
/etc/systemd/system/
directory.sudo mv dcos-local-universe-registry.service /etc/systemd/system/ sudo mv dcos-local-universe-http.service /etc/systemd/system/
-
Confirm that the files were successfully copied into
/etc/systemd/system/
.ls -la /etc/systemd/system/dcos-local-universe-*
-
Load the Catalog into the local Docker instance. This may take some time to complete.
sudo docker load < local-universe.tar.gz
-
Restart the Docker daemon.
sudo systemctl daemon-reload
-
Start the
dcos-local-universe-http
anddcos-local-universe-registry
services.sudo systemctl start dcos-local-universe-http sudo systemctl start dcos-local-universe-registry
-
Confirm that the services are now up and running.
sudo systemctl status dcos-local-universe-http sudo systemctl status dcos-local-universe-registry
Repeat this section until you have completed this procedure for all of your masters. Then continue to the Linking local Catalog to master section below.
Linking local Catalog to master
-
Close the SSH session by typing
exit
, or open a new terminal prompt. You may have to exit more than one SSH session if you have multiple masters. -
(Optional) Use the following command to remove the references to the default Catalog from your cluster. If you want to leave the default Catalog in place and just add the local Catalog as an additional repository, skip to the next step. You can also remove the references to the default Catalog repository from Settings > Package Repositories in the DC/OS web interface.
dcos package repo remove Catalog
-
Use the following command to add a reference to the local Catalogs that you added to each master.
dcos package repo add local-Catalog http://master.mesos:8082/repo
-
SSH into one of your agent nodes.
dcos node ssh --master-proxy --mesos-id=<mesos-id>
-
Use the following commands to download a copy of the DC/OS certificate locally and set it as trusted.
sudo mkdir -p /etc/docker/certs.d/master.mesos:5000 sudo curl -o /etc/docker/certs.d/master.mesos:5000/ca.crt http://master.mesos:8082/certs/domain.crt sudo systemctl restart docker
-
Configure the Apache Mesos fetcher to trust the downloaded Docker certificate.
- Copy the certificate:
sudo cp /etc/docker/certs.d/master.mesos:5000/ca.crt /var/lib/dcos/pki/tls/certs/docker-registry-ca.crt
- Generate a hash:
cd /var/lib/dcos/pki/tls/certs/ openssl x509 -hash -noout -in docker-registry-ca.crt
- Create a soft link. You will need to create the
/pki/tls/certs
directory on the public agent.
sudo ln -s /var/lib/dcos/pki/tls/certs/docker-registry-ca.crt /var/lib/dcos/pki/tls/certs/<hash_number>.0
-
Close the SSH session by typing
exit
, or open a new terminal prompt. Repeat these steps on each agent node. -
To verify your success, log into the DC/OS web interface and click the Catalog tab. You should see a list of Certified packages. Install one of the packages.
FAQ
-
I can’t install CLI subcommands
Packages are hosted at
master.mesos:8082
. If you cannot resolve or connect tomaster.mesos:8082
from your DC/OS CLI install, you cannot install CLI subcommands. If you can connect to port 8082 on your masters, add the IP for one of the masters to/etc/hosts
. -
The images are broken
All Catalog components are hosted inside of your cluster, including the images. The components are served up by
master.mesos:8082
. If you have connectivity to that IP, you can add it to/etc/hosts
and get the images working. -
I don’t see the package I was looking for
By default, only Certified packages are bundled. If you’d like to get something else, use the instructions in the next section.
Selected packages
Prerequisite: Git. On Unix/Linux, see these installation instructions.
To deploy a local Catalog containing your own set of packages you must build a customized local Catalog Docker image.
-
Clone the Catalog repository:
git clone https://github.com/mesosphere/universe.git --branch version-3.x
-
Build the
universe-base
image:cd universe/docker/local-universe/ sudo make base
-
Build the
mesosphere/universe
Docker image and compress it to thelocal-universe.tar.gz
file. Specify a comma-separated list of package names and versions using theDCOS_PACKAGE_INCLUDE
variable. To minimize the container size and download time, you can select only what you need. If you do not use theDCOS_PACKAGE_INCLUDE
variable, all Certified Catalog packages are included. To view which packages are Certified, click the Catalog tab in the DC/OS web interface.sudo make DCOS_VERSION=1.13 DCOS_PACKAGE_INCLUDE="cassandra:1.0.25-3.0.10,marathon:1.4.2" local-universe
-
Perform all of the steps as described in Certified Catalog packages.