Skip to content

Commit ea5fbb3

Browse files
committed
more dockercon prep
1 parent 8736547 commit ea5fbb3

23 files changed

+419
-69
lines changed

create-servers.sh

+24-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#!/bin/bash
2+
set -x
23

3-
# create managers servers
4+
# create managers servers in digital ocean with pre-set environment vars
5+
# https://docs.docker.com/machine/drivers/digital-ocean/
46
for server in {1..3}; do
57
docker-machine create \
68
--driver=digitalocean \
@@ -10,11 +12,27 @@ docker-machine create \
1012
--digitalocean-ssh-key-fingerprint="${SSH_FINGERPRINT}" \
1113
--digitalocean-tags=dogvscat \
1214
dvc${server} &
13-
14-
# enable monitoring
15-
for server in {1..3}; do
16-
docker-machine scp daemon.json dvc${server}:/etc/docker/ &&
17-
docker-machine ssh dvc${server} systemctl restart docker &
1815
done
1916

17+
# if you wanted to create these locally in virtualbox, you might do this
18+
# remember to check if you have enough RAM
19+
# https://docs.docker.com/machine/drivers/virtualbox/
20+
21+
#for server in {1..3}; do
22+
#docker-machine create \
23+
# --driver=virtualbox \
24+
# --virtualbox-memory=2 \
25+
# dvc${server} &
26+
#done
27+
28+
# if you wanted to create these locally in hyper-v (windows 10), you might do this from git bash
29+
# remember to check if you have enough RAM and if virtual switch is created
30+
# https://docs.docker.com/machine/drivers/hyper-v/
2031

32+
#for server in {1..3}; do
33+
#docker-machine create \
34+
# --driver=hyperv \
35+
# --hyperv-memory=2 \
36+
# --hyperv-virtual-switch="Primary Virtual Swtich" \
37+
# dvc${server} &
38+
#done

create-swarm.sh

+7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
11
#!/bin/bash
2+
set -x
3+
4+
# create a swarm as all managers
25
docker-machine ssh dvc1 docker swarm init --listen-addr=eth1 --data-path-addr=eth1 --advertise-addr=eth1
36

7+
docker-machine ssh dvc1 docker swarm join-token manager
8+
9+
# copy this command and add run it on other nodes
10+
# docker-machine ssh dvc2 <paste command>

dci-aws/.gitignore

+8
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ docker_subscription.lic
44
#terraform resources
55
inventory/1.hosts
66

7+
# ansible resources
8+
group_vars/all
9+
.logs
10+
11+
# client bundles
12+
ucp-bundle-admin
13+
ucp-bundle*
14+
715
# Created by https://www.gitignore.io/api/vim,macos,ansible,windows,terraform
816

917
### Ansible ###

dci-aws/group_vars/all

+7-6
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
#
44
# Infrastructure stack
55
#
6-
# infra_stack=vmware
6+
# infra_stack=aws
77

88
#
99
# Docker EE.
1010
#
1111
# docker_ee_version: 17.06
1212

13-
# docker_ee_subscriptions_ubuntu: <placeholder> # Format: sub-xxx-xxx-xxx-xxx
13+
docker_ee_subscriptions_ubuntu: sub-a4bf3c6c-4024-443a-9a20-2337f6fa79e4
1414
# docker_ee_package_version: 3:17.06.2~ee~7~3-0~ubuntu
1515
#
1616
# docker_ee_subscriptions_centos: <placeholder> # Format: sub-xxx-xxx-xxx-xxx
@@ -37,14 +37,14 @@
3737
# Subscription and certificate directories.
3838
# These paths are relative to the root folder (containing inventory/, group_vars/, etc...)
3939
docker_ucp_certificate_directory: ssl_cert
40-
# docker_ucp_license_path: "{{ playbook_dir }}/docker_subscription.lic"
40+
docker_ucp_license_path: "{{ playbook_dir }}/license/docker_subscription.lic"
4141

42-
# docker_ucp_admin_password: <placeholder>
42+
docker_ucp_admin_password: adminadmin123
4343

4444
# DNS name of the UCP load balancer endpoint (e.g. "ucp.example.com").
4545
# This is also used for the SAN (subject alternative names) in any generated UCP certificate,
4646
# and as the address which DTR nodes will use to contact UCP.
47-
# docker_ucp_lb: <placeholder>
47+
docker_ucp_lb: ucp.dogvscat.biz
4848

4949
#
5050
# Docker storage volume.
@@ -60,7 +60,7 @@ docker_ucp_certificate_directory: ssl_cert
6060

6161
# DNS name of the DTR load balancer endpoint (e.g. "dtr.example.com").
6262
# This is also used for the SAN (subject alternative names) in any generated DTR certificate.
63-
# docker_dtr_lb: <placeholder>
63+
docker_dtr_lb: dtr.dogvscat.biz
6464

6565
# The address the initial swarm leader will advertise. The default behavior is to use
6666
# the publicly routable address of `ansible_default_ipv4`. Override this to force swarm to
@@ -73,6 +73,7 @@ docker_ucp_certificate_directory: ssl_cert
7373

7474
# Set to "disabled" to prevent the plugin being installed (even if cloudstor_plugin_options is set).
7575
cloudstor_plugin_version: 1.0
76+
# cloudstor_plugin_version: 18.01.0-ce
7677

7778
# If defined and cloudstor_plugin_version is not "disabled", the playbook will
7879
# install the Cloudstor plugin with these settings on each node:

dci-aws/group_vars/all.example

+79
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
---
2+
3+
#
4+
# Infrastructure stack
5+
#
6+
# infra_stack=vmware
7+
8+
#
9+
# Docker EE.
10+
#
11+
# docker_ee_version: 17.06
12+
13+
# docker_ee_subscriptions_ubuntu: <placeholder> # Format: sub-xxx-xxx-xxx-xxx
14+
# docker_ee_package_version: 3:17.06.2~ee~7~3-0~ubuntu
15+
#
16+
# docker_ee_subscriptions_centos: <placeholder> # Format: sub-xxx-xxx-xxx-xxx
17+
# docker_ee_package_version: 17.06.2.ee.7-3.el7.centos
18+
#
19+
# docker_ee_subscriptions_redhat: <placeholder> # Format: sub-xxx-xxx-xxx-xxx
20+
# docker_ee_package_version: 17.06.2.ee.7-3.el7.rhel
21+
#
22+
# docker_ee_subscriptions_oracle: <placeholder> # Format: sub-xxx-xxx-xxx-xxx
23+
# docker_ee_package_version: 17.06.2.ee.8-3.el7
24+
#
25+
# docker_ee_subscriptions_sles: <placeholder> # Format: sub-xxx-xxx-xxx-xxx
26+
# docker_ee_package_version: 2:17.06.2.ee.7-3
27+
28+
29+
# docker_ee_package_version_win: 17.06.2-ee-7
30+
31+
#
32+
# UCP.
33+
#
34+
35+
# docker_ucp_version: 2.2.9
36+
37+
# Subscription and certificate directories.
38+
# These paths are relative to the root folder (containing inventory/, group_vars/, etc...)
39+
docker_ucp_certificate_directory: ssl_cert
40+
# docker_ucp_license_path: "{{ playbook_dir }}/docker_subscription.lic"
41+
42+
# docker_ucp_admin_password: <placeholder>
43+
44+
# DNS name of the UCP load balancer endpoint (e.g. "ucp.example.com").
45+
# This is also used for the SAN (subject alternative names) in any generated UCP certificate,
46+
# and as the address which DTR nodes will use to contact UCP.
47+
# docker_ucp_lb: <placeholder>
48+
49+
#
50+
# Docker storage volume.
51+
#
52+
# If this is set to a block device then the device will be formatted as ext4 (if not already formatted),
53+
# and mounted at /var/lib/docker.
54+
# docker_storage_volume="/dev/xvdb"
55+
# DTR
56+
#
57+
58+
# docker_dtr_version: 2.4.3
59+
# docker_dtr_replica_id: <placeholder> # (A 12-character long hexadecimal number: e.g. 1234567890ab)
60+
61+
# DNS name of the DTR load balancer endpoint (e.g. "dtr.example.com").
62+
# This is also used for the SAN (subject alternative names) in any generated DTR certificate.
63+
# docker_dtr_lb: <placeholder>
64+
65+
# The address the initial swarm leader will advertise. The default behavior is to use
66+
# the publicly routable address of `ansible_default_ipv4`. Override this to force swarm to
67+
# listen on a non-default interface
68+
# docker_swarm_listen_address: <placeholder>
69+
70+
#
71+
# Cloudstor
72+
#
73+
74+
# Set to "disabled" to prevent the plugin being installed (even if cloudstor_plugin_options is set).
75+
cloudstor_plugin_version: 1.0
76+
77+
# If defined and cloudstor_plugin_version is not "disabled", the playbook will
78+
# install the Cloudstor plugin with these settings on each node:
79+
# cloudstor_plugin_options: "CLOUD_PLATFORM=AWS EFS_ID_REGULAR=fs-AAA EFS_ID_MAXIO=fs-BBB EFS_SUPPORTED=1 AWS_STACK_ID=S2UCVL19bO2DOhi6"

dci-aws/group_vars/linux

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
---
22
ansible_become: yes
3-
#ansible_user: ubuntu
3+
ansible_user: ubuntu
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
*.pem
2+
*.crt
3+
*.key
4+
openssl.cnf
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
openssl req -nodes -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 3650 -subj "/C=US/ST=Somewhere/L=Anywhere/O=Computer/CN=*.dogvscat.biz" -config openssl.cnf
3+
# cat cert.crt key.key > full.pem
4+
cp cert.pem ca.pem

0 commit comments

Comments
 (0)