Via Artifacts Container

ENTERPRISE

BETA

Installing the DC/OS Storage Service using the artifacts container

WARNING: Beta Software This software may contain bugs, incomplete features, incorrect documentation, or other discrepancies. Contact Mesosphere before deploying a beta candidate service. Product support is available to approved participants in the beta test program. Contact support@mesosphere.io for information about participation.

NOTE: This install method is deprecated. Please consider switching to the package registry based install method.

Prerequisites

  • DC/OS Enterprise 1.12 or later.
  • DC/OS CLI is installed and you are logged in as a superuser.

Download the package tarball

DC/OS Storage Service (DSS) is packaged as a tarball. The tarball can be downloaded from Mesosphere support site. Please note that in order to download software from the support page, you must have a Mesosphere support account.

Build the local universe and artifacts server

Extract DC/OS Storage Service (DSS) package tarball. You should name the tarball package.tgz.

NOTE: Do not delete the package after extraction.

$ tar zxvf package.tgz
$ cd package

Build the Docker image that will serve both the local universe and the artifacts used by DC/OS Storage Service. Specify the DOCKER_IMAGE environment variable accordingly so that the image can be pushed to docker hub or your local docker registry.

NOTE: Do not specify the tag of the Docker image. The tag will be generated by the build script according to the version of the DSS package.

$ DOCKER_IMAGE=user/storage-artifacts universe/build.sh

The build script will generate some instructions for the next steps like the following. Notice, that the <SHA> will be replaced with a real SHA1 value, reflecting the version of the DSS package.

NOTE: * Do not change the SHA value during the instruction workflow.

========== Next Steps

  1. Push the docker image ‘user/storage-artifacts:

    :; docker push user/storage-artifacts:<SHA>
    
  2. Run the following marathon app in your cluster

    :; dcos marathon app add /dev/stdin <<EOF
    
    {
      "id": "/storage-artifacts/<SHA>",
      "instances": 1,
      "cpus": 0.25,
      "mem": 128,
      "container": {
        "type": "MESOS",
        "docker": {
          "image": "user/storage-artifacts:<SHA>",
          "forcePullImage": true
        },
        "portMappings": [
          {
            "containerPort": 80,
            "labels": {
              "VIP_0": "/storage-artifacts/<SHA>:10000"
            },
            "protocol": "tcp"
          }
        ]
      },
      "networks": [
        {
          "mode": "container/bridge"
        }
      ]
    }
    EOF
    
  3. Add the custom package repository

    :; dcos package repo add storage-artifacts-<SHA> http://storage-artifacts<SHA>.marathon.l4lb.thisdcos.directory:10000/repo.json --index=0
    
  4. Install the package

    :; dcos package install beta-storage --package-version=<VERSION>
    

Follow the instructions and push the newly built docker image to a docker registry accessible in the cluster.

$ docker push user/storage-artifacts:<SHA>

Launch the local universe and artifacts server

When the docker image has been pushed to the docker registry successfully, use the marathon config to launch a Marathon app that will serve the local universe and the storage artifacts.

$ cat <<EOF | dcos marathon app add /dev/stdin
{
  "id": "/storage-artifacts/<SHA>",
  "instances": 1,
  "cpus": 0.25,
  "mem": 128,
  "container": {
    "type": "MESOS",
    "docker": {
      "image": "user/storage-artifacts:<SHA>",
      "forcePullImage": true
    },
    "portMappings": [
      {
        "containerPort": 80,
        "labels": {
          "VIP_0": "/storage-artifacts/<SHA>:10000"
        },
        "protocol": "tcp"
      }
    ]
  },
  "networks": [
    {
      "mode": "container/bridge"
    }
  ]
}
EOF

Add the local universe

Wait for the Marathon app to be in “Running” state, and then add the local universe for the DSS package.

$ dcos package repo add storage-artifacts-<SHA> http://storage-artifacts<SHA>.marathon.l4lb.thisdcos.directory:10000/repo.json --index=0

Install the DSS package

When the above step is successful, install the DSS package by using the below command. This command will install the DC/OS storage sub-command.

$ dcos package install beta-storage --package-version=<VERSION>

Verify that the DSS is running

Run the following command and wait for the DSS to be ready.

$ dcos storage version