Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1226 commits
Select commit Hold shift + click to select a range
b7fe2b2
Merge pull request #653 from dav1x/initial-3.6-vmw
dav1x Aug 16, 2017
517ab96
rolling back skip-packages (#654)
cooktheryan Aug 17, 2017
1210754
Removing rhel_subscription role
cwilkers Aug 17, 2017
95b7f17
Add 3.5
glennswest Aug 17, 2017
67140f5
Cleanup images
glennswest Aug 17, 2017
6a528d5
Configure different Docker volume sizes for different roles (#644)
Tlacenka Aug 17, 2017
636c24d
Download the oc binary from the master node (#657)
tomassedovic Aug 17, 2017
30d256e
Fix README for overwrite
glennswest Aug 18, 2017
121faf3
Merge branch 'master' of https://github.com/openshift/openshift-ansib…
glennswest Aug 18, 2017
2d82ea0
Update to 7.4
glennswest Aug 18, 2017
ec3f24e
Fix up sku selector
glennswest Aug 18, 2017
2cd9762
Fix version
glennswest Aug 18, 2017
9cbe58e
Switch to dev branch
glennswest Aug 18, 2017
cdc8b28
Switch all to use 7.4 (using sku 7-RAW)
glennswest Aug 18, 2017
a821d55
Add a contributing guide
tomassedovic Aug 18, 2017
1d3d412
need privilges to run non-atomic-command
cooktheryan Aug 18, 2017
c5e7781
allow elevated privs
cooktheryan Aug 18, 2017
793cc0e
Merge pull request #662 from cooktheryan/non-atomic-fix
dav1x Aug 18, 2017
9c76653
Add a missing word
tomassedovic Aug 18, 2017
405483b
need to actually connect to the host not local connection (#664)
cooktheryan Aug 18, 2017
c1009d7
Another missing word
tomassedovic Aug 18, 2017
0037eb9
Don't forget the satellites (#663)
cwilkers Aug 18, 2017
24370d4
Resolving #660 items (#665)
cooktheryan Aug 18, 2017
c348630
adding files for 3.6 update and optimizing some rhsm
dav1x Aug 18, 2017
e84dc1f
fixes issue #658
dav1x Aug 18, 2017
ebda330
remove openshift-storage includes and add new docker-storage-setup
dav1x Aug 18, 2017
8c91b44
adding rhsm role
dav1x Aug 18, 2017
2238ded
lint changes
dav1x Aug 18, 2017
526a90f
Merge pull request #666 from dav1x/fix-clean-add-rhsm
dav1x Aug 18, 2017
2f808bf
Merge pull request #659 from glennswest/master
glennswest Aug 21, 2017
635a6af
resolves #669 and resolves #668 (#670)
cooktheryan Aug 21, 2017
2b3a6e9
Merge pull request #661 from tomassedovic/contributing
bogdando Aug 21, 2017
ec07a43
Update openshift_release in the sample inventory (#647)
tomassedovic Aug 21, 2017
603f218
Ignore *.cfg and *.crt in the openstack inventory (#672)
tomassedovic Aug 21, 2017
7ad2123
Remove `set -x` from the e2e ci pod validation (#673)
tomassedovic Aug 21, 2017
c927f4f
destory file for OCP on Azure (#675)
jameslabocki Aug 21, 2017
f4b584f
Add docs and defaults for multi-master setup
bogdando Aug 16, 2017
2c57130
Update main.yaml for new directory structure
jameslabocki Aug 21, 2017
8a3e693
Change path to include 3.5 directory.
jameslabocki Aug 21, 2017
2251615
Merge pull request #677 from openshift/jameslabocki-patch-2
glennswest Aug 22, 2017
e3ae2a9
Merge pull request #676 from openshift/jameslabocki-patch-1
glennswest Aug 22, 2017
7882cfd
Add links to all ref. archs. on main README (#682)
Aug 22, 2017
056ce7e
Use overlay2 in GCP ref. arch. (#681)
Aug 22, 2017
c541dd0
Don't reattach the pool (#680)
Aug 22, 2017
9eed871
Merge pull request #649 from bogdando/mms
bogdando Aug 23, 2017
e3f7df1
Pin the openshift-ansible version in the CI
tomassedovic Aug 23, 2017
4e458f7
Show git status of the openshift-anisble version
tomassedovic Aug 23, 2017
15fbad5
Merge pull request #687 from tomassedovic/pin-openshift-ansible-in-ci
bogdando Aug 23, 2017
ce9b66f
Add documentation regarding running custom post-provision tasks (#678)
tzumainn Aug 23, 2017
2a0afda
Fix node label customisation (#679)
Tlacenka Aug 23, 2017
81d772c
link to most the recent OSP ref arch (#671)
dlbewley Aug 24, 2017
7be1f76
Do not repeat pre_tasks for post-provision playbook (#689)
bogdando Aug 24, 2017
18ff4e7
RHSM pool example, trial gcp account info (#693)
Aug 24, 2017
b1f63ee
Invalid JSON Format (#692)
eye0fra Aug 24, 2017
5e992e7
Brownfield BYO Bastion Template (#691)
eye0fra Aug 24, 2017
ce3be1e
Cast num_* as int for jinja templates (#685)
bogdando Aug 25, 2017
9593ffb
Added checks for configured images and flavors (#688)
Tlacenka Aug 25, 2017
2ea1ccf
Support external/pre-provisioned authoritative cluster DNS (#690)
bogdando Aug 25, 2017
626958c
Tower Integration for OCP on Azure. Refactored AWS. Linting Issues fi…
jameslabocki Aug 26, 2017
f37b0b9
Switch openshift-ansible back to master in the CI (#700)
tomassedovic Aug 28, 2017
845bae9
Use HTTPS LB instead of SSL proxy (#703)
Aug 28, 2017
8008fd4
Add custom post-provision playbook for adding yum repos (#697)
tzumainn Aug 31, 2017
7aa47d3
Add --validation option to GCP deploy script (#709)
Aug 31, 2017
e903f55
osp validation script (#711)
cooktheryan Sep 1, 2017
06abd17
Document global DNS security options (#694)
bogdando Sep 5, 2017
daa0b91
Allow using a provider network (#701)
tomassedovic Sep 6, 2017
82a11c3
Fix openstack CI (#714)
tomassedovic Sep 6, 2017
97c99ad
Point openshift_master_cluster_public_hostname at master or lb if def…
tzumainn Sep 6, 2017
1013e6c
Add --minor-upgrade option (#716)
Sep 7, 2017
90889d6
Updating some modules and branch
dav1x Sep 7, 2017
4ec2795
updating rhsm-sub and rhsm-repos
dav1x Sep 7, 2017
3eae937
removing config files
dav1x Sep 7, 2017
3ba8883
remove added plays
dav1x Sep 7, 2017
e766086
changed openshift-install
dav1x Sep 7, 2017
be665a1
changes to crs create
dav1x Sep 7, 2017
390c42f
lint issues
dav1x Sep 7, 2017
4e5edb7
more lint
dav1x Sep 7, 2017
1751dc6
Update main.yaml
dav1x Sep 7, 2017
89b24e0
Update main.yaml
dav1x Sep 7, 2017
eef5cb6
Merge pull request #717 from dav1x/vmw-3.6
dav1x Sep 7, 2017
d99ca7d
adding etcd storage to masters
dav1x Sep 7, 2017
cdf797e
automate cloud provider during install
dav1x Sep 8, 2017
5ebd940
scaleup add vsphere.confg
dav1x Sep 8, 2017
16d42a9
Merge branch 'vmw-3.6' of https://github.com/dav1x/openshift-ansible-…
dav1x Sep 8, 2017
b88376e
lint
dav1x Sep 8, 2017
aa8c64b
Merge pull request #719 from dav1x/vmw-3.6
dav1x Sep 8, 2017
3e188d5
no cert validation on cleanup
dav1x Sep 8, 2017
92fa4ec
Merge pull request #720 from dav1x/vmw-3.6
dav1x Sep 8, 2017
3f50608
auto create the storage class based on vmware_datacenter
dav1x Sep 11, 2017
2b4991b
Merge pull request #721 from dav1x/vmw-3.6-storageclass
dav1x Sep 11, 2017
ac5b244
add etcd str role
dav1x Sep 11, 2017
bf3a567
updated lint and specified lv and vg
dav1x Sep 11, 2017
b70f8f7
Merge pull request #722 from dav1x/vmw-3.6-etcd-str
dav1x Sep 11, 2017
ecc8707
Vmw 3.6 fix ds var (#723)
dav1x Sep 12, 2017
1cf6275
openstack: make server ports be trunk ports (#713)
celebdor Sep 12, 2017
2d3fae8
Add ssd storage class (#724)
Sep 12, 2017
afd6a03
Support Cinder-backed Openshift registry (#707)
tomassedovic Sep 12, 2017
074b3e5
Add ability to support custom api and console ports (#712)
etsauer Sep 12, 2017
c43660a
adding some fixes (#725)
dav1x Sep 12, 2017
38ba1dd
Vmw 3.6 (#726)
dav1x Sep 12, 2017
c478cfc
Vmw 3.6 remove fs role (#727)
dav1x Sep 12, 2017
b6dd8f1
Pre-create a Cinder registry volume
tomassedovic Sep 11, 2017
d2be382
Fix the cinder_registry_volume conditional
tomassedovic Sep 13, 2017
8a204aa
Clear the previous inventory during provisioning
tomassedovic Sep 13, 2017
443b828
Merge pull request #728 from tomassedovic/prebuild-cinder-registry
tzumainn Sep 13, 2017
0f7b04e
Merge pull request #730 from tomassedovic/always-refresh-hosts
tzumainn Sep 13, 2017
2d5704d
Make the `rhsm_register` value optional
tomassedovic Sep 14, 2017
5fe8f8c
Remove the `rhsm_register` value from inventory
tomassedovic Sep 14, 2017
d1fd976
Merge pull request #732 from tomassedovic/make-rhsm-registry-optional
tzumainn Sep 14, 2017
fb58369
change of docker backend (#731)
cooktheryan Sep 14, 2017
86b13c5
Fixed typo (#735)
Sep 15, 2017
a52bcc5
Use ansible installer role to set the node local quota (#736)
Sep 18, 2017
040f777
Fix scaling up for 3.6 and RHEL (#741)
Sep 19, 2017
288fef2
Empty ssh (#729)
tomassedovic Sep 19, 2017
957a313
Docker ansible host (#742)
tomassedovic Sep 19, 2017
071251f
Better documentation (#744)
Sep 19, 2017
ad490fb
Integrate SSO into 3.6 Ref Arch (#739)
glennswest Sep 20, 2017
d5ce811
Set Ansible version in openstack CI for 2.3 (#750)
tomassedovic Sep 21, 2017
0cded5e
load balancer formatting fix (#745)
tzumainn Sep 21, 2017
1dbde59
WIP: lowering required permissions for iam role (#748)
cooktheryan Sep 21, 2017
11e82e4
epel URL fix for Vagrant (#544) (#755)
bengentil Sep 25, 2017
1e5beed
Rhv 3.6 disks (#756)
cwilkers Sep 25, 2017
d361dc4
Upscaling OpenShift application nodes (#571)
Tlacenka Sep 26, 2017
4669bf3
Fix public master cluster DNS record when using bastion (#752)
bogdando Sep 26, 2017
c1cee12
add provider setup
dav1x Sep 27, 2017
59aa0fb
adding default repos to rhsm vars
dav1x Sep 27, 2017
65478de
update deploy-host to support specificed providers
dav1x Sep 28, 2017
66ef7ec
remove separate task for localhost
dav1x Sep 28, 2017
1b29c4c
accidently renamed ovirt
dav1x Sep 28, 2017
614ff4b
adding rhv repo and package install
dav1x Sep 28, 2017
b9f868d
Required variables to create dedicated lv
Sep 29, 2017
630bbcc
Make it future proof
Sep 29, 2017
7e73ca8
Required variables to create dedicated lv (#765)
Sep 29, 2017
4279561
auto gen ssh key for rhv and vmw
dav1x Sep 29, 2017
26c1bc6
version bump for upgrade plays (#770)
cooktheryan Oct 2, 2017
5809924
check for provider and skip disable if its defined
dav1x Oct 2, 2017
0577ca6
add osp
dav1x Oct 2, 2017
7fdb0ae
Adding role to clean up pvs (#769)
etsauer Oct 2, 2017
15be1eb
Adding the option to use 'stack_state' to allow for easy de-provision…
oybed Oct 2, 2017
76c4210
Fixed lint and added ansible_distribution check
Oct 3, 2017
3d14386
all systems need the atomic-openshift-node package anyways (#768)
cooktheryan Oct 3, 2017
432b57d
lint issues
dav1x Oct 3, 2017
53b210d
lint issues
dav1x Oct 3, 2017
7210b6c
lint issues
dav1x Oct 3, 2017
4bc306b
Merge pull request #764 from e-minguez/overlay2_vars_vmware
dav1x Oct 3, 2017
88c3b79
Merge pull request #763 from dav1x/provider-setup
dav1x Oct 3, 2017
b95b2f6
timeout test (#762)
cooktheryan Oct 4, 2017
1fcde0b
Use Ansible stable 2.3 instead of 2.2 (#738)
bgeesaman Oct 4, 2017
b1c9827
Set node selector in openshift-infra namespace (#759)
Oct 4, 2017
c969394
Required variables to create dedicated lv (#766)
Oct 4, 2017
72d0ee7
Fix error when adding new nodes (number of application nodes > 8)
Oct 4, 2017
8430c50
Fix error when adding new nodes in Azure (number of application nodes…
schen1 Oct 4, 2017
eca18f1
Update raw github links needed when using curl
Oct 4, 2017
5a73412
Update raw github links needed when using curl for bastion.sh
Oct 4, 2017
9c6991c
rollback to remove package to support origin (#775)
cooktheryan Oct 4, 2017
2abe439
Fixing various contrib changes causing CASL breakage (#771)
oybed Oct 4, 2017
51e0176
Add dynamic inventory
tomassedovic Oct 2, 2017
a3ae34a
Merge pull request #774 from schen1/master
glennswest Oct 5, 2017
552c2a3
Change add_host.sh to be part of bastion.sh and remove, makes changin…
glennswest Oct 5, 2017
83dcd8b
Add support for passing github url for new add_node
glennswest Oct 5, 2017
181b8f6
Fix flake8 errors
tomassedovic Oct 5, 2017
3fb3db7
Set public_v4 to private_v4 if it doesn't exist
tomassedovic Oct 5, 2017
c87c523
WIP: fix of requiretty
cooktheryan Oct 5, 2017
1325be2
Merge pull request #781 from cooktheryan/sudoers-tty
dav1x Oct 5, 2017
1e9a391
Revert "WIP: fix of requiretty" (#782)
dav1x Oct 5, 2017
dc4395c
keepalived for ha haproxy & ocp-on-vmware.py rework (#777)
dav1x Oct 5, 2017
4f2ed15
Rhv 3.6 updates (#783)
cwilkers Oct 6, 2017
b061524
Add a echo of path
glennswest Oct 6, 2017
546bcfa
Fix repo
glennswest Oct 6, 2017
1c73318
Replace the CASL references (#778)
tomassedovic Oct 6, 2017
4d0a5da
Switch to the latest openshift-ansible
tomassedovic Oct 6, 2017
1200c8f
Fix parent on commandline
glennswest Oct 6, 2017
647f9cc
Replace github path with auto generated one
glennswest Oct 6, 2017
00ecbbf
Revert to production repo
glennswest Oct 6, 2017
78c7231
Merge branch 'master' of https://github.com/openshift/openshift-ansib…
glennswest Oct 6, 2017
c55bf50
change public_hosted_zone to dns_zone
dav1x Oct 6, 2017
90a2cc5
Merge pull request #786 from openshift/test-openstack-latest-openshif…
tzumainn Oct 6, 2017
32bdbd5
Adjusting logic on rhsm_user (#784)
cwilkers Oct 6, 2017
ef2247c
Merge pull request #776 from tomassedovic/dynamic-inventory
tzumainn Oct 6, 2017
a4eb710
Merge pull request #787 from glennswest/master
glennswest Oct 7, 2017
5a6c192
Add CentOS support to the docker-storage-setup role
tomassedovic Oct 9, 2017
cf1e040
Added server_hostname as a parameter rhsm_hostname (#792)
cwilkers Oct 10, 2017
0389692
Better credentials for GCP (#791)
Oct 10, 2017
af9f352
Fix for this issue https://bugzilla.redhat.com/show_bug.cgi?id=149537…
Oct 10, 2017
f49c594
Merge pull request #788 from dav1x/zone-name-fix
dav1x Oct 10, 2017
6969705
fix keepalived issues and rename ha_lb_host to ha_lb_ip
dav1x Oct 11, 2017
22d8df3
add keepalived handler
dav1x Oct 11, 2017
8290f51
Update main.yaml
dav1x Oct 11, 2017
4fff75f
Streamline the OpenStack provider README
tomassedovic Oct 12, 2017
89b8481
Merge pull request #795 from dav1x/keepalived-fix
dav1x Oct 12, 2017
79b5ef6
Attach additional RHN Pools (post-provision custom action) (#753)
Tlacenka Oct 12, 2017
2bb21a8
Fixes for metrics (#797)
Oct 12, 2017
b450ff7
Allow the specification of server group policies when provisioning op…
tzumainn Oct 13, 2017
9a697ac
Make the private key examples consistent
tomassedovic Oct 13, 2017
255bda6
Merge branch 'master' into openstack-docs
tomassedovic Oct 13, 2017
428018c
Add Extra Docker Registry URLs (custom post-provision action) (#794)
Tlacenka Oct 13, 2017
5e8adad
changing the docs for setup for providers
dav1x Oct 13, 2017
0522c4b
fix table format
dav1x Oct 13, 2017
e081931
fix table format
dav1x Oct 13, 2017
4b06117
fix table format
dav1x Oct 13, 2017
d498da8
fix table format
dav1x Oct 13, 2017
622b195
More robust teardown
Oct 13, 2017
f4e7c55
fix table format for real this time
dav1x Oct 13, 2017
e637ac7
re-arrange README.md for vmware
dav1x Oct 13, 2017
6a10925
re-arrange README.md for vmware
dav1x Oct 13, 2017
225ce2f
re-arrange README.md for vmware
dav1x Oct 13, 2017
d83bf08
Fixed teardown (#804)
Oct 13, 2017
5159efd
re-arrange README.md for vmware
dav1x Oct 13, 2017
1b8b76c
re-arrange README.md for vmware
dav1x Oct 13, 2017
03d4539
add comma for package list for gcp
dav1x Oct 16, 2017
ca88364
Support separate data network for Flannel SDN (#757)
bogdando Oct 16, 2017
d69e97c
Merge pull request #808 from dav1x/fix_deploy_host_setup
dav1x Oct 16, 2017
c0cf9c7
Updating the issue template to be more consistent in format. (#810)
mbruzek Oct 16, 2017
e89bd6b
[WIP] Merge server with nofloating server heat templates (#761)
bogdando Oct 17, 2017
e5bf2b8
Hostfile2inventory (#813)
cwilkers Oct 17, 2017
8d14089
Docker storage fix (#812)
cwilkers Oct 17, 2017
0d2c180
Fix broken node labels when using with Vagrant 2.0 (#816)
barlik Oct 18, 2017
d2ff422
Add Flannel support (#814)
bogdando Oct 18, 2017
3823c72
Add Extra CAs (custom post-provision action) (#801)
Tlacenka Oct 18, 2017
9f69f21
Merge branch 'master' into openstack-docs
tomassedovic Oct 18, 2017
2e6426b
Revert the console hostname change
tomassedovic Oct 18, 2017
d20b0f9
Remove bash highlight
tomassedovic Oct 18, 2017
332f131
Merge branch 'docker-storage-setup' into openshift-ansible-source
tomassedovic Oct 18, 2017
6f4d509
Merge ../openshift-ansible-contrib into openstack-provider-githist
tomassedovic Nov 7, 2017
85181ea
Move the OpenStack playbooks
tomassedovic Nov 7, 2017
d148b6d
.gitignore casl-infra
tomassedovic Oct 16, 2017
baf7066
Update lookup plugins path
tomassedovic Oct 16, 2017
479ba2d
Update readme
tomassedovic Oct 16, 2017
8b8eeab
Use the docker-storage-setup role
tomassedovic Oct 16, 2017
4ed9aef
Add openshift_openstack role and move tasks there
tomassedovic Oct 23, 2017
63fb0c7
Remove the extra roles
tomassedovic Oct 27, 2017
b1e4629
Remove the openstack custom-actions for now
tomassedovic Oct 27, 2017
9441393
Remove the post-install and scale-up playbooks
tomassedovic Oct 27, 2017
eb1f810
Use correct host group in provision.yml
tomassedovic Oct 27, 2017
fabf162
Add a stub of the dns record update code in
tomassedovic Oct 30, 2017
84259a3
Remove the subscription-manager role
tomassedovic Nov 1, 2017
88907ac
Use the existing ansible.cfg file
tomassedovic Nov 1, 2017
dba6b45
Remove the static_inventory and bastion samples
tomassedovic Nov 1, 2017
fcf1494
FIXUP ANSIBLE CFG
tomassedovic Nov 1, 2017
e34025f
Move the vars/main.yml to defaults
tomassedovic Nov 1, 2017
23674d5
Remove the subnet_update_dns_servers task list
tomassedovic Nov 1, 2017
79f29bc
Add the DNS updates and rename the openstack vars
tomassedovic Nov 1, 2017
f462e7a
Move the selinux check up
tomassedovic Nov 2, 2017
bde35d5
Use the default `item` loop variable for checks
tomassedovic Nov 2, 2017
4fd33e9
Simplify the template paths for the storage setup
tomassedovic Nov 2, 2017
ad84935
Use `null` instead of `False` where it makes sense
tomassedovic Nov 2, 2017
b951705
Namespace the OpenStack vars
tomassedovic Nov 2, 2017
6779186
Fix tox
tomassedovic Nov 2, 2017
6241f87
Namespace the docker volumes
tomassedovic Nov 2, 2017
2e9d134
Remove an unused retry file
tomassedovic Nov 7, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions ansible.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ fact_caching = jsonfile
fact_caching_connection = $HOME/ansible/facts
fact_caching_timeout = 600
callback_whitelist = profile_tasks
inventory_ignore_extensions = secrets.py, .pyc, .cfg, .crt
# work around privilege escalation timeouts in ansible:
timeout = 30

# Uncomment to use the provided BYO inventory
#hostfile = inventory/byo/hosts
Expand Down
262 changes: 262 additions & 0 deletions playbooks/openstack/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,262 @@
# OpenStack Provisioning

This directory contains [Ansible][ansible] playbooks and roles to create
OpenStack resources (servers, networking, volumes, security groups,
etc.). The result is an environment ready for OpenShift installation
via [openshift-ansible].

We provide everything necessary to be able to install OpenShift on
OpenStack (including the DNS and load balancer servers when
necessary). In addition, we work on providing integration with the
OpenStack-native services (storage, lbaas, baremetal as a service,
dns, etc.).


## OpenStack Requirements

Before you start the installation, you need to have an OpenStack
environment to connect to. You can use a public cloud or an OpenStack
within your organisation. It is also possible to
use [Devstack][devstack] or [TripleO][tripleo]. In the case of
TripleO, we will be running on top of the **overcloud**.

The OpenStack release must be Newton (for Red Hat OpenStack this is
version 10) or newer. It must also satisfy these requirements:

* Heat (Orchestration) must be available
* The deployment image (CentOS 7 or RHEL 7) must be loaded
* The deployment flavor must be available to your user
- `m1.medium` / 4GB RAM + 40GB disk should be enough for testing
- look at
the [Minimum Hardware Requirements page][hardware-requirements]
for production
* The keypair for SSH must be available in openstack
* `keystonerc` file that lets you talk to the openstack services
* NOTE: only Keystone V2 is currently supported

Optional:
* External Neutron network with a floating IP address pool


## DNS Requirements

OpenShift requires DNS to operate properly. OpenStack supports DNS-as-a-service
in the form of the Designate project, but the playbooks here don't support it
yet. Until we do, you will need to provide a DNS solution yourself (or in case
you are not running Designate when we do).

If your server supports nsupdate, we will use it to add the necessary records.

TODO(shadower): describe how to build a sample DNS server and how to configure
our playbooks for nsupdate.


## Installation

There are four main parts to the installation:

1. [Preparing Ansible and dependencies](#1-preparing-ansible-and-dependencies)
2. [Configuring the desired OpenStack environment and OpenShift cluster](#2-configuring-the-openstack-environment-and-openshift-cluster)
3. [Creating the OpenStack resources (VMs, networking, etc.)](#3-creating-the-openstack-resources-vms-networking-etc)
4. [Installing OpenShift](#4-installing-openshift)

This guide is going to install [OpenShift Origin][origin]
with [CentOS 7][centos7] images with minimal customisation.

We will create the VMs for running OpenShift, in a new Neutron
network, assign Floating IP addresses and configure DNS.

The OpenShift cluster will have a single Master node that will run
`etcd`, a single Infra node and two App nodes.

You can look at
the [Advanced Configuration page][advanced-configuration] for
additional options.



### 1. Preparing Ansible and dependencies

First, you need to select where to run [Ansible][ansible] from (the
*Ansible host*). This can be the computer you read this guide on or an
OpenStack VM you'll create specifically for this purpose.

We will use
a
[Docker image that has all the dependencies installed][control-host-image] to
make things easier. If you don't want to use Docker, take a look at
the [Ansible host dependencies][ansible-dependencies] and make sure
they're installed.

Your *Ansible host* needs to have the following:

1. Docker
2. `keystonerc` file with your OpenStack credentials
3. SSH private key for logging in to your OpenShift nodes

Assuming your private key is `~/.ssh/id_rsa` and `keystonerc` in your
current directory:

```bash
$ sudo docker run -it -v ~/.ssh:/mnt/.ssh:Z \
-v $PWD/keystonerc:/root/.config/openstack/keystonerc.sh:Z \
redhatcop/control-host-openstack bash
```

This will create the container, add your SSH key and source your
`keystonerc`. It should be set up for the installation.

You can verify that everything is in order:


```bash
$ less .ssh/id_rsa
$ ansible --version
$ openstack image list
```


### 2. Configuring the OpenStack Environment and OpenShift Cluster

The configuration is all done in an Ansible inventory directory. We
will clone the [openshift-ansible][openshift-ansible] repository and set
things up for a minimal installation.


```
$ git clone https://github.com/openshift/openshift-ansible
$ cp -r openshift-ansible/playbooks/openstack/sample-inventory/ inventory
```

If you're testing multiple configurations, you can have multiple
inventories and switch between them.

#### OpenStack Configuration

The OpenStack configuration is in `inventory/group_vars/all.yml`.

Open the file and plug in the image, flavor and network configuration
corresponding to your OpenStack installation.

```bash
$ vi inventory/group_vars/all.yml
```

1. Set the `openshift_openstack_keypair_name` to your OpenStack keypair name.
- See `openstack keypair list` to find the keypairs registered with
OpenShift.
- This must correspond to your private SSH key in `~/.ssh/id_rsa`
2. Set the `openshift_openstack_external_network_name` to the floating IP
network of your openstack.
- See `openstack network list` for the list of networks.
- It's often called `public`, `external` or `ext-net`.
3. Set the `openshift_openstack_default_image_name` to the image you want your
OpenShift VMs to run.
- See `openstack image list` for the list of available images.
4. Set the `openshift_openstack_default_flavor` to the flavor you want your
OpenShift VMs to use.
- See `openstack flavor list` for the list of available flavors.
5. Set the `openshift_openstack_dns_nameservers` to the list of the IP addresses
of the DNS servers used for the **private** address resolution.

**NOTE ON DNS**: at minimum, the OpenShift nodes need to be able to access each
other by their hostname. OpenStack doesn't provide this by default, so you
need to provide a DNS server. Put the address of that DNS server in
`openshift_openstack_dns_nameservers` variable.




#### OpenShift configuration

The OpenShift configuration is in `inventory/group_vars/OSEv3.yml`.

The default options will mostly work, but unless you used the large
flavors for a production-ready environment, openshift-ansible's
hardware check will fail.

Let's disable those checks by putting this in
`inventory/group_vars/OSEv3.yml`:

```yaml
openshift_disable_check: disk_availability,memory_availability
```

**NOTE**: The default authentication method will allow **any username
and password** in! If you're running this in a public place, you need
to set up access control.

Feel free to look at
the [Sample OpenShift Inventory][sample-openshift-inventory] and
the [advanced configuration][advanced-configuration].


### 3. Creating the OpenStack resources (VMs, networking, etc.)

We provide an `ansible.cfg` file which has some useful defaults -- you should
copy it to the directory you're going to run `ansible-playbook` from.

```bash
$ cp openshift-ansible/ansible.cfg ansible.cfg
```

Then run the provisioning playbook -- this will create the OpenStack
resources:

```bash
$ ansible-playbook --user openshift -i inventory openshift-ansible/playbooks/openstack/openshift-cluster/provision.yaml
```

If you're using multiple inventories, make sure you pass the path to
the right one to `-i`.

If your SSH private key is not in `~/.ssh/id_rsa` use the `--private-key`
option to specify the correct path.


### 4. Installing OpenShift

Run the `byo/config.yml` playbook on top of the OpenStack nodes we have
prepared.

```bash
$ ansible-playbook -i inventory openshift-ansible/playbooks/byo/config.yml
```


### Next Steps

And that's it! You should have a small but functional OpenShift
cluster now.

Take a look at [how to access the cluster][accessing-openshift]
and [how to remove it][uninstall-openshift] as well as the more
advanced configuration:

* [Accessing the OpenShift cluster][accessing-openshift]
* [Removing the OpenShift cluster][uninstall-openshift]
* Set Up Authentication (TODO)
* [Multiple Masters with a load balancer][loadbalancer]
* [External Dns][external-dns]
* Multiple Clusters (TODO)
* [Cinder Registry][cinder-registry]
* [Bastion Node][bastion]


[ansible]: https://www.ansible.com/
[openshift-ansible]: https://github.com/openshift/openshift-ansible
[devstack]: https://docs.openstack.org/devstack/
[tripleo]: http://tripleo.org/
[ansible-dependencies]: ./advanced-configuration.md#dependencies-for-localhost-ansible-controladmin-node
[control-host-image]: https://hub.docker.com/r/redhatcop/control-host-openstack/
[hardware-requirements]: https://docs.openshift.org/latest/install_config/install/prerequisites.html#hardware
[origin]: https://www.openshift.org/
[centos7]: https://www.centos.org/
[sample-openshift-inventory]: https://github.com/openshift/openshift-ansible/blob/master/inventory/byo/hosts.example
[advanced-configuration]: ./advanced-configuration.md
[accessing-openshift]: ./advanced-configuration.md#accessing-the-openshift-cluster
[uninstall-openshift]: ./advanced-configuration.md#removing-the-openshift-cluster
[loadbalancer]: ./advanced-configuration.md#multi-master-configuration
[external-dns]: ./advanced-configuration.md#dns-configuration-variables
[cinder-registry]: ./advanced-configuration.md#creating-and-using-a-cinder-volume-for-the-openshift-registry
[bastion]: ./advanced-configuration.md#configure-static-inventory-and-access-via-a-bastion-node
Loading