Skip to content

Commit 2d78e7c

Browse files
committed
Docs update for 4.1
1 parent b03e29c commit 2d78e7c

34 files changed

+45
-3080
lines changed

BUILD.md

-19
Original file line numberDiff line numberDiff line change
@@ -32,22 +32,3 @@ To build a container image of `openshift-ansible` using standalone **Docker**:
3232

3333
cd openshift-ansible
3434
docker build -f images/installer/Dockerfile -t openshift-ansible .
35-
36-
## Build the Atomic System Container
37-
38-
A system container runs using runC instead of Docker and it is managed
39-
by the [atomic](https://github.com/projectatomic/atomic/) tool. As it
40-
doesn't require Docker to run, the installer can run on a node of the
41-
cluster without interfering with the Docker daemon that is configured
42-
by the installer itself.
43-
44-
The first step is to build the [container image](#build-an-openshift-ansible-container-image)
45-
as described before. The container image already contains all the
46-
required files to run as a system container.
47-
48-
Once the container image is built, we can import it into the OSTree
49-
storage:
50-
51-
```
52-
atomic pull --storage ostree docker:openshift-ansible:latest
53-
```

CONTRIBUTING.md

-28
Original file line numberDiff line numberDiff line change
@@ -74,27 +74,6 @@ If you are new to Git, these links might help:
7474

7575
---
7676

77-
## Simple all-in-one localhost installation
78-
```
79-
git clone https://github.com/openshift/openshift-ansible
80-
cd openshift-ansible
81-
sudo ansible-playbook -i inventory/hosts.localhost playbooks/prerequisites.yml
82-
sudo ansible-playbook -i inventory/hosts.localhost playbooks/deploy_cluster.yml
83-
```
84-
85-
## Development process
86-
Most changes can be applied by re-running the config playbook. However, while
87-
the config playbook will run faster the second time through it's still going to
88-
take a very long time. As such, you may wish to run a smaller subsection of the
89-
installation playbooks. You can for instance run the node, master, or hosted
90-
playbooks in playbooks/openshift-node/config.yml,
91-
playbooks/openshift-master/config.yml, playbooks/openshift-hosted/config.yml
92-
respectively.
93-
94-
We're actively working to refactor the playbooks into smaller discrete
95-
components and we'll be documenting that structure shortly, for now those are
96-
the most sensible logical units of work.
97-
9877
## Running tests and other verification tasks
9978

10079
We use [`tox`](http://readthedocs.org/docs/tox/) to manage virtualenvs where
@@ -171,13 +150,6 @@ be reinstalled.
171150

172151
Here are some useful tips that might improve your workflow while working on this repository.
173152

174-
#### Git Hooks
175-
176-
Git hooks are included in this repository to aid in development. Check
177-
out the README in the
178-
[hack/hooks](http://github.com/openshift/openshift-ansible/blob/master/hack/hooks/README.md)
179-
directory for more information.
180-
181153
#### Activating a virtualenv managed by tox
182154

183155
If you want to enter a virtualenv created by tox to do additional debugging, you

DEPLOYMENT_TYPES.md

-16
This file was deleted.

HOOKS.md

+12-31
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Hooks
22

3-
The ansible installer allows for operators to execute custom tasks during
3+
OpenShift Ansible allows for operators to execute custom tasks during
44
specific operations through a system called hooks. Hooks allow operators to
55
provide files defining tasks to execute before and/or after specific areas
66
during installations and upgrades. This can be very helpful to validate
@@ -16,21 +16,17 @@ need to be updated to meet the new standard.
1616

1717
## Using Hooks
1818

19-
Hooks are defined in the ``hosts`` inventory file under the ``OSEv3:vars``
19+
Hooks are defined in the ``hosts`` inventory file under the ``nodes:vars``
2020
section.
2121

2222
Each hook should point to a yaml file which defines Ansible tasks. This file
2323
will be used as an include meaning that the file can not be a playbook but
2424
a set of tasks. Best practice suggests using absolute paths to the hook file to avoid any ambiguity.
2525

26-
### Example
26+
### Example inventory variables
2727
```ini
28-
[OSEv3:vars]
28+
[nodes:vars]
2929
# <snip>
30-
openshift_master_upgrade_pre_hook=/usr/share/custom/pre_master.yml
31-
openshift_master_upgrade_hook=/usr/share/custom/master.yml
32-
openshift_master_upgrade_post_hook=/usr/share/custom/post_master.yml
33-
3430
openshift_node_upgrade_pre_hook=/usr/share/custom/pre_node.yml
3531
openshift_node_upgrade_hook=/usr/share/custom/node.yml
3632
openshift_node_upgrade_post_hook=/usr/share/custom/post_node.yml
@@ -40,46 +36,31 @@ openshift_node_upgrade_post_hook=/usr/share/custom/post_node.yml
4036
Hook files must be a yaml formatted file that defines a set of Ansible tasks.
4137
The file may **not** be a playbook.
4238

43-
### Example
39+
### Example hook task file
4440
```yaml
41+
4542
---
4643
# Trivial example forcing an operator to ack the start of an upgrade
47-
# file=/usr/share/custom/pre_master.yml
44+
# file=/usr/share/custom/pre_node.yml
4845

49-
- name: note the start of a master upgrade
46+
- name: note the start of a node upgrade
5047
debug:
51-
msg: "Master upgrade of {{ inventory_hostname }} is about to start"
48+
msg: "Node upgrade of {{ inventory_hostname }} is about to start"
5249

5350
- name: require an operator agree to start an upgrade
5451
pause:
55-
prompt: "Hit enter to start the master upgrade"
52+
prompt: "Hit enter to start the node upgrade"
5653
```
5754
58-
## Upgrade Hooks
59-
60-
### openshift_master_upgrade_pre_hook
61-
- Runs **before** each master is upgraded.
62-
- This hook runs against **each master** in serial.
63-
- If a task needs to run against a different host, said task will need to use [``delegate_to`` or ``local_action``](http://docs.ansible.com/ansible/playbooks_delegation.html#delegation).
64-
65-
### openshift_master_upgrade_hook
66-
- Runs **after** each master is upgraded but **before** it's service/system restart.
67-
- This hook runs against **each master** in serial.
68-
- If a task needs to run against a different host, said task will need to use [``delegate_to`` or ``local_action``](http://docs.ansible.com/ansible/playbooks_delegation.html#delegation).
69-
70-
71-
### openshift_master_upgrade_post_hook
72-
- Runs **after** each master is upgraded and has had it's service/system restart.
73-
- This hook runs against **each master** in serial.
74-
- If a task needs to run against a different host, said task will need to use [``delegate_to`` or ``local_action``](http://docs.ansible.com/ansible/playbooks_delegation.html#delegation).
55+
## Available Upgrade Hooks
7556
7657
### openshift_node_upgrade_pre_hook
7758
- Runs **before** each node is upgraded.
7859
- This hook runs against **each node** in serial.
7960
- If a task needs to run against a different host, said task will need to use [``delegate_to`` or ``local_action``](http://docs.ansible.com/ansible/playbooks_delegation.html#delegation).
8061
8162
### openshift_node_upgrade_hook
82-
- Runs **after** each node is upgraded but **before** it's marked schedulable again..
63+
- Runs **after** each node is upgraded but **before** it's marked schedulable again.
8364
- This hook runs against **each node** in serial.
8465
- If a task needs to run against a different host, said task will need to use [``delegate_to`` or ``local_action``](http://docs.ansible.com/ansible/playbooks_delegation.html#delegation).
8566

README.md

+29-146
Original file line numberDiff line numberDiff line change
@@ -1,172 +1,55 @@
11
[![Join the chat at https://gitter.im/openshift/openshift-ansible](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/openshift/openshift-ansible)
22
[![Build Status](https://travis-ci.org/openshift/openshift-ansible.svg?branch=master)](https://travis-ci.org/openshift/openshift-ansible)
3-
[![Coverage Status](https://coveralls.io/repos/github/openshift/openshift-ansible/badge.svg?branch=master)](https://coveralls.io/github/openshift/openshift-ansible?branch=master)
4-
5-
NOTICE
6-
======
7-
8-
Master branch is closed! A major refactor is ongoing in devel-40.
9-
Changes for 3.x should be made directly to the latest release branch they're
10-
relevant to and backported from there.
11-
12-
WARNING
13-
=======
14-
15-
This branch is under heavy development. If you are interested in deploying a
16-
working cluster, please utilize a release branch.
173

184
# OpenShift Ansible
19-
205
This repository contains [Ansible](https://www.ansible.com/) roles and
21-
playbooks to install, upgrade, and manage
22-
[OpenShift](https://www.openshift.com/) clusters.
23-
24-
## Getting the correct version
25-
When choosing an openshift release, ensure that the necessary origin packages
26-
are available in your distribution's repository. By default, openshift-ansible
27-
will not configure extra repositories for testing or staging packages for
28-
end users.
29-
30-
We recommend using a release branch. We maintain stable branches
31-
corresponding to upstream Origin releases, e.g.: we guarantee an
32-
openshift-ansible 3.2 release will fully support an origin
33-
[1.2 release](https://github.com/openshift/openshift-ansible/tree/release-1.2).
34-
35-
The most recent branch will often receive minor feature backports and
36-
fixes. Older branches will receive only critical fixes.
37-
38-
In addition to the release branches, the master branch
39-
[master branch](https://github.com/openshift/openshift-ansible/tree/master)
40-
tracks our current work **in development** and should be compatible
41-
with the
42-
[Origin master branch](https://github.com/openshift/origin/tree/master)
43-
(code in development).
44-
6+
playbooks for [OpenShift](https://www.openshift.com/) clusters.
457

8+
## Previous OpenShift Ansible 3.x releases
9+
For 3.x releases of OpenShift Ansible please reference the release branch for
10+
specific versions. The last 3.x release is
11+
[3.11 release](https://github.com/openshift/openshift-ansible/tree/release-3.11).
4612

47-
**Getting the right openshift-ansible release**
13+
## OpenShift 4.x
14+
Installation of OpenShift 4.x uses a command-line installation wizard instead of
15+
Ansible playbooks. Learn more about the OpenShift Installer in this
16+
[overview](https://github.com/openshift/installer/blob/master/docs/user/overview.md#installer-overview).
4817

49-
Follow this release pattern and you can't go wrong:
18+
For OpenShift 4.x, this repo only provides playbooks necessary for scaling up an
19+
existing 4.x cluster with RHEL hosts.
5020

51-
| Origin/OCP | OpenShift-Ansible version | openshift-ansible branch |
52-
| ------------- | ----------------- |----------------------------------|
53-
| 1.3 / 3.3 | 3.3 | release-1.3 |
54-
| 1.4 / 3.4 | 3.4 | release-1.4 |
55-
| 1.5 / 3.5 | 3.5 | release-1.5 |
56-
| 3.*X* | 3.*X* | release-3.x |
57-
58-
If you're running from the openshift-ansible **master branch** we can
59-
only guarantee compatibility with the newest origin releases **in
60-
development**. Use a branch corresponding to your origin version if
61-
you are not running a stable release.
62-
63-
64-
## Setup
65-
66-
Install base dependencies:
21+
The [master branch](https://github.com/openshift/openshift-ansible/tree/master)
22+
tracks our current work **in development**.
6723

6824
Requirements:
6925

7026
- Ansible >= 2.7.8
71-
- Jinja >= 2.7
7227
- pyOpenSSL
73-
- python-lxml
74-
75-
----
76-
77-
Fedora:
78-
79-
```
80-
dnf install -y ansible pyOpenSSL python-cryptography python-lxml
81-
```
82-
83-
## Simple all-in-one localhost Installation
84-
This assumes that you've installed the base dependencies and you're running on
85-
Fedora or RHEL
86-
```
87-
git clone https://github.com/openshift/openshift-ansible
88-
cd openshift-ansible
89-
sudo ansible-playbook -i inventory/hosts.localhost playbooks/prerequisites.yml
90-
sudo ansible-playbook -i inventory/hosts.localhost playbooks/deploy_cluster.yml
91-
```
28+
- python2-openshift
9229

9330
# Quickstart
9431

95-
Install the new installer from https://www.github.com/openshift/installer
96-
97-
Construct a proper install-config.yml, and make a copy called
98-
install-config-ansible.yml.
99-
100-
## Hosts
101-
You will need the following hosts
102-
103-
### Boostrap host
104-
This is a special host that is not part of the cluster but is required to be
105-
available to help the cluster bootstrap itself. This is not a bastion host,
106-
it will initially be part of the cluster and should be able to communicate with
107-
the masters in the cluster.
108-
109-
### Masters
110-
You need 1 or 3 masters.
111-
112-
### Workers
113-
You need 0 or more workers. Note, by default, masters are unschedulable so
114-
you will need one or more workers if you want to schedule workloads.
115-
116-
## DNS
117-
4.x installs require specific dns records to be in place, and there is no way
118-
to complete an install without working DNS. You are in charge of ensuring the
119-
following DNS records are resolvable from your cluster, the openshift-ansible
120-
installer will not make any attempt to do any of this for you.
121-
122-
First, the output of ```hostname``` on each host must be resolvable to other hosts.
123-
The nodes will communicate with each other based on this value.
124-
125-
install-config.yml value of 'baseDomain' must be a working domain.
126-
127-
### A records
128-
```sh
129-
<clustername>-api.<baseDomain> # ex: mycluster-api.example.com
130-
<clustername>-master-0.<baseDomain> # ex: mycluster-master-0.example.com
131-
<clustername>-etcd-0.<baseDomain> # ex: mycluster-etcd-0.example.com
132-
<clustername>-bootstrap.<baseDomain> # ex: mycluster-bootstrap.example.com
133-
```
134-
135-
Note: There should be a master/etcd record for each master host in your cluster
136-
(either 1 or 3). etcd hosts must be master hosts, and the records must resolve
137-
to the same host for each master/etcd record, respectively.
138-
139-
### SRV records
140-
```sh
141-
SRV _etcd-client-ssl._tcp.<clustername>.<baseDomain> '1 1 2379 <clustername>-etcd-0.<baseDomain>'
142-
SRV _etcd-server-ssl._tcp.<clustername>.<baseDomain> '1 1 2380 <clustername>-etcd-0.<baseDomain>'
143-
...
144-
SRV _etcd-client-ssl._tcp.<clustername>.<baseDomain> '1 1 2379 <clustername>-etcd-<N-1>.<baseDomain>'
145-
SRV _etcd-server-ssl._tcp.<clustername>.<baseDomain> '1 1 2380 <clustername>-etcd-<N-1>.<baseDomain>'
146-
147-
# ex: _etcd-client-ssl._tcp.mycluster.example.com '1 1 2379 mycluster-etcd-0.example.com'
148-
```
149-
150-
Consult with your DNS provider about the proper way to create SRV records. In
151-
any case, there should be a client and server SRV record for each etcd backend,
152-
and you MUST use the etcd FQDN you created earlier, not the master or any other
153-
record.
32+
## Install an OpenShift 4.x cluster
33+
Install a cluster using the [OpenShift Installer](https://www.github.com/openshift/installer).
15434

15535
## Inventory
156-
Check out inventory/40_basic_inventory.ini for an example.
36+
Create an inventory file with the `new_workers` group to identify the hosts which
37+
should be added to the cluster.
38+
```yaml
39+
40+
---
41+
[new_workers]
42+
mycluster-worker-0.example.com
43+
mycluster-worker-1.example.com
44+
mycluster-worker-2.example.com
45+
```
15746

158-
## Generate ignition configs
159-
Use the openshift-install command to generate ignition configs utilizing the
160-
install-config.yml you created earlier. This will consume the install-config.yml
161-
file, so ensure you have copied the file as mentioned previously.
47+
## Run the scaleup playbook
16248

163-
```sh
164-
openshift-install create ignition-configs
49+
```bash
50+
ansible-playbook playbooks/openshift_node/scaleup.yml
16551
```
16652

167-
## Run playbook
168-
playbooks/deploy_cluster_40.yml
169-
17053
# Further reading
17154

17255
## Complete Production Installation Documentation:

0 commit comments

Comments
 (0)