|
1 | 1 | # Contiv Installation for Docker Swarm & Kubernetes 1.4+
|
2 |
| - |
3 |
| -## Docker Swarm installation |
4 |
| - |
5 |
| -### Pre-requisites |
6 |
| -* Supported operating systems are CentOS 7.x or RHEL 7.x. |
7 |
| -* Docker needs to be installed on the host where the installer is being run. |
8 |
| -* Install a docker swarm cluster (or) |
9 |
| - Use the Contiv installer to install the scheduler stack after installing docker |
10 |
| - on a node external to the cluster where the scheduler stack is being installed. |
| 2 | +Install Contiv on your Docker Swarm or Kubernetes cluster. |
| 3 | +## Docker Swarm Installation |
| 4 | +### Prerequisites |
| 5 | +* CentOS 7.x operating system |
| 6 | +* Docker installed on the host where you are running the installer. |
| 7 | +* Install a Docker Swarm cluster or use the Contiv installer to install the scheduler stack after installing Docker on a node external to the cluster where the scheduler stack is being installed. |
11 | 8 |
|
12 | 9 | ### Contiv Installation
|
13 | 10 |
|
14 |
| -Contiv swarm installer is launched from a host external to the cluster. |
15 |
| -Here is the reference layout. All the nodes need to be accessible to the installer host. |
16 |
| -``` |
17 |
| -
|
18 |
| - ┌─────────────────────────────────────────────────────────────┐ |
19 |
| - │ ##### # # # ##### ####### ####### ###### │ |
20 |
| - │ # # # # # # # # # # # │ |
21 |
| - │ # # # # # # # # # │ |
22 |
| - │ # # # # ##### # ##### ###### │ |
23 |
| - │ # # # # # # # # # │ |
24 |
| - │ # # # # # # # # # # # │ |
25 |
| - │ ##### ####### ##### ##### # ####### # # │ |
26 |
| - │ │ |
27 |
| - │ │ |
28 |
| - │ ┌───────────────┐ │ |
29 |
| - │ │ │ │ |
30 |
| - ┌──────── SSH ──┼─────────────────────────────────────────▶ Worker Node │ │ |
31 |
| - │ │ ┌────────────────────┐ │ │ │ |
32 |
| - │ │ │ │ └───────────────┘ │ |
33 |
| - │ │ ┌──────▶ Master Node │ │ |
34 |
| - │ │ │ │ │ ┌───────────────┐ │ |
35 |
| - │ │ │ └────────────────────┘ │ │ │ |
36 |
| - ┌────────────┴────────────┐ │ │ │ Worker Node ◀───┼──┐ |
37 |
| - │ │ │ │ │ │ │ │ |
38 |
| - │ Install Host │ │ │ ┌────────────────────┐ │ │ │ │ |
39 |
| - │(Ansible based installer,│ │ │ │ └───────────────┘ │ │ |
40 |
| - │ running in a docker │───┼── SSH ─▶ Master Node │ │ │ |
41 |
| - │ container) │ │ │ │ ┌───────────────┐ │ │ |
42 |
| - │ │ │ │ └────────────────────┘ │ │ │ │ |
43 |
| - │ │ │ │ │ Worker Node │◀──┼──┤ |
44 |
| - └────────────┬────────────┘ │ │ │ │ │ │ |
45 |
| - │ │ │ ┌────────────────────┐ │ │ │ │ |
46 |
| - │ │ │ │ │ └───────────────┘ │ │ |
47 |
| - │ │ └──────▶ Master Node │ │ │ |
48 |
| - │ │ │ │ ┌───────────────┐ │ │ |
49 |
| - │ │ └────────────────────┘ │ │ │ │ |
50 |
| - ├───────── SSH ─┼─────────────────────────────────────────▶ Worker Node │ │ │ |
51 |
| - │ │ │ │ │ │ |
52 |
| - │ │ └───────────────┘ │ │ |
53 |
| - │ │ │ │ |
54 |
| - │ │ │ │ |
55 |
| - │ │ │ │ |
56 |
| - │ │ │ │ |
57 |
| - │ └─────────────────────────────────────────────────────────────┘ │ |
58 |
| - │ │ |
59 |
| - │ │ |
60 |
| - └──────────────────────────────────────────── SSH ───────────────────────────────┘ |
61 |
| - |
62 |
| -
|
63 |
| -``` |
64 |
| - |
65 |
| -* `curl -L -O https://github.com/contiv/install/releases/download/$VERSION/contiv-$VERSION.tgz` |
66 |
| -* To use a local installation for Contiv components you may use the larger version of the installer |
67 |
| - using `curl -L -O https://github.com/contiv/install/releases/download/$VERSION/contiv-full-$VERSION.tgz`. |
68 |
| - This should be used only in cases where accessibility to network is slow. |
69 |
| -* `tar xf contiv-$VERSION.tgz` |
70 |
| -* `cd contiv-$VERSION` |
71 |
| -* Install Contiv with Docker Swarm |
72 |
| -* `./install/ansible/install_swarm.sh -f cfg.yml -e <ssh key> -u <username> -i` |
73 |
| -* Uninstall Contiv with Docker Swarm and reset install state |
74 |
| -* `./install/ansible/uninstall_swarm.sh -f cfg.yml -e <ssh key> -u <username> -i -r` |
75 |
| -* Install Contiv with Docker Swarm and ACI |
76 |
| -* `./install/ansible/install_swarm.sh -f aci_cfg.yml -e <ssh key> -u <username> -i -m aci` |
77 |
| -* Uninstall Contiv with Docker Swarm and ACI, retaining the install state |
78 |
| -* `./install/ansible/uninstall_swarm.sh -f aci_cfg.yml -e <ssh key> -u <username> -i -m aci` |
79 |
| -* Example host config file is available at install/ansible/cfg.yml and install/ansible/aci_cfg.yml |
80 |
| -* To see additional install options and examples, run `./install/ansible/install_swarm.sh -h`. |
81 |
| - |
82 |
| -## Kubernetes 1.4 installation |
83 |
| - |
84 |
| -### Pre-requisites |
85 |
| - |
86 |
| -* Supported operating systems are CentOS 7.x or RHEL 7.x. |
87 |
| -* Install kubernetes 1.4 or higher using http://kubernetes.io/docs/getting-started-guides/kubeadm/. |
88 |
| -* Contiv service-cidr is currently 10.254.0.0/16. So `kubeadm init` step needs to be called with `--service-cidr 10.254.0.0/16` parameter. |
89 |
| -* Step (3/4) in the kubeadm install guide has to be replaced with the Contiv Installation below. |
90 |
| -* Contiv Installation can be done before or after (4/4) in the kubeadm install guide. |
| 11 | +The Contiv Docker Swarm installer is launched from a host external to the cluster. All the nodes must be accessible to the Contiv Ansible-based installer host through SSH. |
| 12 | + |
| 13 | +* Download the installer bundle: <br>`curl -L -O https://github.com/contiv/install/releases/download/$VERSION/contiv-$VERSION.tgz`<br> |
| 14 | +If your access to the Internet is limited or slow and you want to download the full Contiv install, choose <br> |
| 15 | +`contiv-full-$VERSION.tgz`<br> |
| 16 | +Note: The full image contains only Contiv components. Installing Docker Swarm will need Internet connectivity. |
| 17 | +* Extract the install bundle <br>`tar xf contiv-$VERSION.tgz`. |
| 18 | +* Change directories to the extracted folder <br>`cd contiv-$VERSION` |
| 19 | +* To install Contiv with Docker Swarm:<br> `./install/ansible/install_swarm.sh -f cfg.yml -e <ssh key> -u <username> -i` |
| 20 | +* To install Contiv with Docker Swarm and ACI:<br> `./install/ansible/install_swarm.sh -f aci_cfg.yml -e <ssh key> -u <username> -i -m aci` |
| 21 | +* Example host config files are available at install/ansible/cfg.yml and install/ansible/aci_cfg.yml |
| 22 | +* To see additional install options and examples, run <br>`./install/ansible/install_swarm.sh -h`. |
| 23 | + |
| 24 | +### Removing Contiv |
| 25 | + |
| 26 | +If you need to remove Contiv from Docker Swarm and return to your original state, you can uninstall Contiv with the following commands: |
| 27 | +* To uninstall Contiv and Docker Swarm:<br> |
| 28 | +`./install/ansible/uninstall_swarm.sh -f cfg.yml -e <ssh key> -u <username> -i` |
| 29 | +* To uninstall Contiv and Docker Swarm with ACI support:<br> |
| 30 | +`./install/ansible/uninstall_swarm.sh -f aci_cfg.yml -e <ssh key> -u <username> -i -m aci` |
| 31 | +* To uninstall Contiv and not Docker Swarm:<br> |
| 32 | +`./install/ansible/uninstall_swarm.sh -f cfg.yml -e <ssh key> -u <username>` |
| 33 | +* Note: Adding the `-r` flag, will cleanup any Contiv state. |
| 34 | + |
| 35 | +## Kubernetes 1.4 Installation |
| 36 | + |
| 37 | +### Prerequisites |
| 38 | + |
| 39 | +* CentOS 7.x operating system |
| 40 | +* Install Kubernetes 1.4: |
| 41 | + 1. Contiv service-cidr is currently 10.254.0.0/16. `kubeadm init` step needs to be called with the `--service-cidr 10.254.0.0/16` parameter. |
| 42 | + 2. Replace step (3/4) in the kubeadm install guide with the following Contiv Installation Instructions. Contiv installation can be done after completing step (4/4). |
| 43 | + 3. Instructions to install kubernetes 1.4 are available [here.](http://kubernetes.io/docs/getting-started-guides/kubeadm/) |
91 | 44 |
|
92 | 45 | ### Contiv Installation
|
93 |
| - |
94 |
| -* `curl -L -O https://github.com/contiv/install/releases/download/$VERSION/contiv-$VERSION.tgz` |
95 |
| -* `tar xf contiv-$VERSION.tgz` |
96 |
| -* `cd contiv-$VERSION` |
97 |
| -* Run `sudo ./install/k8s/install.sh -n $CONTIV_MASTER`, |
98 |
| - where $CONTIV_MASTER is the IP to be used for the Contiv proxy. |
99 |
| -* To see additional install options and examples, run `./install/ansible/install.sh -h`. |
100 |
| -* Run `sudo ./install/k8s/uninstall.sh` to uninstall Contiv. |
101 |
| - |
| 46 | +* Run the following commands on the kubernetes master host. |
| 47 | +* Use curl to get the installer bundle: <br>`curl -L -O https://github.com/contiv/install/releases/download/$VERSION/contiv-$VERSION.tgz` |
| 48 | +* Extract the install bundle <br>`tar xf contiv-$VERSION.tgz`. |
| 49 | +* Change directories to the extracted folder <br>`cd contiv-$VERSION` |
| 50 | +* Run `sudo ./install/k8s/install.sh -n $CONTIV_MASTER` |
| 51 | + where `$CONTIV_MASTER` is the Contiv proxy IP. |
| 52 | +* To see additional install options, run <br> `./install/ansible/install.sh`. |
| 53 | + |
| 54 | +### Removing Contiv |
| 55 | +If you need to remove Contiv, and get back to your original state, run: |
| 56 | +`sudo ./install/k8s/uninstall.sh` |
0 commit comments