Simple Rancher deployment for DSWB.
dos2unix
openssl
- Docker v1.11.2
- Docker Compose v1.8.1
- Gumby cluster (
dswb-rancher
)
-
Save the TLS certificate bundle of your DSWB domain in
ssl/certificate-bundle.pem
. -
Save its signing key in
ssl/private-key.pem
. -
Create an
env
file usingenv.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 toDHPARAM=<here>
in theenv
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 forDHPARAM
, 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
, andMYSQL_PASSWORD
) to the same value. Use the command below to generate it.openssl rand -base64 16
-
-
Reset permissions for the
env
file.chmod 400 env
-
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
-
Deploy Rancher using
docker-compose
.docker-compose up -d
-
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. -
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.
Please refer to LICENSE.
- Emerging Technologies Team, IBM Analytics Platform Services
- Henrique Zambon @hzambon