Skip to content

cognitive-class/rancher-deploy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rancher Deploy

Simple Rancher deployment for DSWB.

Prerequisites

  • dos2unix
  • openssl
  • Docker v1.11.2
  • Docker Compose v1.8.1
  • Gumby cluster (dswb-rancher)

Setup

  1. Save the TLS certificate bundle of your DSWB domain in ssl/certificate-bundle.pem.

  2. Save its signing key in ssl/private-key.pem.

  3. Create an env file using env.example as a reference.

    • DSWB_DOMAIN is your DSWB domain (e.g.: dswb.example.com).

    • DHPARAM can be generated by the following command. Mind that it will take several minutes to run.

      openssl dhparam -out ssl/dhparam.pem 4096

      Line breaks must be replaced with the literal \n, so that it can fit in one line. Use the following command, and copy/paste its output to DHPARAM=<here> in the env file.

      dos2unix ssl/dhparam.pem
      cat ssl/dhparam.pem | sed -e ':a' -e 'N' -e '$!ba' -e 's/\n/\\n/g'
    • CERTIFICATE_BUNDLE holds the TLS certificate bundle for the DSWB domain. Like for DHPARAM, line breaks must be replaced with the literal \n.

      dos2unix ssl/certificate-bundle.pem
      cat ssl/certificate-bundle.pem | sed -e ':a' -e 'N' -e '$!ba' -e 's/\n/\\n/g'
    • PRIVATE_KEY is the TLS certificate's signing key. One again, replace line breaks with the literal \n.

      dos2unix ssl/private-key.pem
      cat ssl/private-key.pem | sed -e ':a' -e 'N' -e '$!ba' -e 's/\n/\\n/g'
    • Set all password fields (CATTLE_DB_CATTLE_PASSWORD, MYSQL_ROOT_PASSWORD, and MYSQL_PASSWORD) to the same value. Use the command below to generate it.

      openssl rand -base64 16
  4. Reset permissions for the env file.

    chmod 400 env

Deploy

  1. Configure Docker Machine to point to Gumby's dswb-rancher cluster.

    export MACHINE_STORAGE_PATH="$GUMBY_CONFIG_PATH/dswb-rancher"
    eval $(docker-machine env dswb-rancher-01)
    docker-machine active
  2. Deploy Rancher using docker-compose.

    docker-compose up -d
  3. Rancher will take several minutes to initialize. You can check its progress using the command below.

    docker-compose logs -f rancher

    Hit ctrl-c at any time to exit.

  4. Important: Reset Docker Machine configuration.

    unset DOCKER_TLS DOCKER_HOST DOCKER_CERT_PATH DOCKER_MACHINE_NAME
    unset MACHINE_STORAGE_PATH

After Rancher is initialized, you can access it at https://<dswb-rancher private IP>, or https://rancher.DSWB_DOMAIN, in case your DNS provider has already been configured.

License

Please refer to LICENSE.

Authors

  • Emerging Technologies Team, IBM Analytics Platform Services
  • Henrique Zambon @hzambon

About

[DEPRECATED] Simple Rancher deployment for DSWB

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published