-
Notifications
You must be signed in to change notification settings - Fork 72
re-org: Move openshift deployment to playbooks dir #84
Conversation
If you think that this change is ok, I will also send a PR for updating the docs. |
cec548d
to
a9ca557
Compare
state: stopped | ||
enabled: no | ||
name: firewalld | ||
failed_when: "result|failed and not 'Could not find the requested service' in result.msg" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will not result|failed
be enough?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, in case that firewalld is not installed, the result|failed is true, but we don't care because firewalld is not installed.
- name: Load openshift facts | ||
openshift_facts: | ||
role: common | ||
|
||
- name: Set facts for docker-storage-setup | ||
block: | ||
- name: Detecting Operating System from ostree_booted |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/Detecting/Detect
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
||
- name: install epel repository | ||
yum: | ||
name: https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and I'm not sure about the syntax here, see: http://docs.ansible.com/ansible/latest/yum_repository_module.html#examples
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The module that you have pasted should be used when you want to manually configure a repository. In our case, we use a release RPM.
|
||
- name: install epel repository | ||
yum: | ||
name: https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and I'm not sure about the syntax here, see: http://docs.ansible.com/ansible/latest/yum_repository_module.html#examples
- sos | ||
- psacct | ||
- docker | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I deployed a cluster using the standard CentOS image from https://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud.qcow2
To get openshift-ansible to run, I had to install:
yum-utils ansible wget git net-tools bind-utils iptables-services bridge-utils bash-completion kexec-tools sos psacct docker sshpass NetworkManager centos-release-openshift-origin.noarch ceph-common docker centos-release-openshift iptables-utils NetworkManager atomic-openshift-utils
And ensure NetworkManager is started and enabled
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prerequisites that don't appear here (such as NetworkManager, and centos-release-openshift) are being cared as part of the openshift-ansible modules.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't work for me until I manually installed them before running deploy_cluster.yml
@@ -1,3 +1,3 @@ | |||
- import_playbook: "{{ playbook_dir }}/deploy-with-{{ provider | default('lago') }}.yml" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would move all playbooks (including control.yml) under playbooks
dir
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will be done in the following patches.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't want to do the entire re-org in one patch because it makes the code review overwhelming.
e143ee9
to
8d0fa57
Compare
- "{{ playbook_dir }}/vars/{{ openshift_ver }}.yml" | ||
|
||
- name: set SELinux to permissive mode | ||
command: setenforce 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is setting to enforcing mode. Did you mean setenforce 0
? Or is the text wrong?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct, I'll fix it.
- name: set SELinux to permissive mode | ||
command: setenforce 1 | ||
|
||
- name: set SELinux to permissive mode under configuration file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you run this without become: true
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can see at the top of the playbook that we use remote_user: root
.
If you think that we should use become
, we can do it a different PR.
- Custom variables per Openshift version can be declared under playbooks/cluster/openshift/vars/ - Use a static version for Openshift 3.9 (v3.9.0-alpha.4) - Rename deploy-openshift.yml to config.yml. - Add the prerequisites of openshift to config.yml - there is no reason to keep them in a separate file. - Add a global variable file at vars/global_vars.yml Signed-off-by: gbenhaim <galbh2@gmail.com>
8d0fa57
to
f36b1f8
Compare
@rthallisey I've fixed the |
This change is not reflected in README, and made it outdated, please try to keep readme uptodate. |
Custom variables per Openshift version can be declared under
playbooks/cluster/openshift/vars/
Use a static version for Openshift 3.9 (v3.9.0-alpha.4)
Renamed deploy-openshift.yml to config.yml.
Added the prerequisites of openshift to config.yml - there is no
reason to keep them in a separate file.
Signed-off-by: gbenhaim galbh2@gmail.com