Making providers common#126
Conversation
| @@ -0,0 +1,2 @@ | |||
| # The Reference Architecture Common Playbooks and Roles | |||
There was a problem hiding this comment.
Why not move these to the root of the repo?
playbooks/
roles/
There was a problem hiding this comment.
ahhh interesting. I had not thought about that. Let me move some pieces around
playbooks/empty-dir-quota.yaml
Outdated
| vars_files: | ||
| - vars/main.yaml | ||
| roles: | ||
| - ../roles/openshift-emptydir-quota |
There was a problem hiding this comment.
will probably be better to add a symlink to ../roles in the playbooks directory rather than reference the role this way.
playbooks/empty-dir-quota.yaml
Outdated
| gather_facts: yes | ||
| become: yes | ||
| vars_files: | ||
| - vars/main.yaml |
There was a problem hiding this comment.
vars_files may be problematic, I would suggest that required settings be passed in for generic playbooks.
There was a problem hiding this comment.
Should be able to just remove them as it doesn't appear that the vars matter in regards to the play
|
Both atomic containerized and RHEL install are good on AWS |
|
aos-ci-test |
|
e61e1fe - State: error - All Test Contexts: aos-ci-jenkins/openshift-ansible-contrib-validate - Logs: https://aos-ci.s3.amazonaws.com/openshift/openshift-ansible-contrib/jenkins-e2e-openshift-on-aws-pr-2-test-matrix-nodes=openshift-ose-aws-slave-2/e61e1feeed84696dd3bd2a55f4c450ced24e9380.txt |
| @@ -15,7 +15,7 @@ | |||
| - validate-etcd | |||
There was a problem hiding this comment.
I think this playbook should be called post-validation and not validation.
roles/rhsm-repos/tasks/main.yaml
Outdated
| @@ -0,0 +1,38 @@ | |||
| --- | |||
| - name: disable unneeded repos | |||
| command: subscription-manager repos --disable='*' | |||
There was a problem hiding this comment.
There should probably be a prior step to determine what repos are currently enabled and only disable/enable when needed. Examples below shows what I mean as well as moving the conditional around:
- name: Example playbooks
hosts: example_hosts
roles:
- role: rhsm-repos
when: "{{ ansible_distribution == 'RedHat' and openshift_manage_repos is true }}"
# a bit handwavy, since this output needs to be filtered, or a diff command used, but this example assumes that the output here is just a bare list of repos enabled
- command: subscription-manager repos --list-enabled
register: subscription_manager_repos
changed_when: false
- block:
- name: disable repos
command: "subscription-manager{{ ' --disable='.join(repos_to_remove) + ' --enable'.join(repos_to_add)}}"
when: "{{ repos_to_remove | length > 0 or repos_to_add | length > 0 }}"
vars:
repo_list:
- rhel-7-server-rpms
- rhel-7-server-extras-rpms
- rhel-7-server-ose-3.3-rpms
repos_to_remove: "{{ subscription_manager_repos | difference(repo_list) }}"
repos_to_add: "{{ repo_list | difference(subscription_manager_repos) }}"
....
| pool: "{{ rhsm_pool }}" | ||
| when: "'Subscribed' not in subscribed.stdout and rhsm_activation_key is defined and rhsm_activation_key != 'None'" | ||
| register: register_key_result | ||
| register: register_key_result and ansible_distribution == "RedHat" |
There was a problem hiding this comment.
I'd move the ansible_distribution == "RedHat" either to a conditional on a block that contains all the tasks, or move it into a conditional on the role in the playbook.
There was a problem hiding this comment.
I'm really digging this whole bock idea
There was a problem hiding this comment.
Blocks are awesome. Allowing for the conditionals to be applied in one place is nice, but setting vars at the block-scope is even better :)
|
@detiber went block crazy and verified with both centos/origin and rhel/ocp. Will look into the repos enable/disable next week |
|
@detiber I can't get manage to create a sane output from the disable/enable play. Using the above prints everything but the stdout_lines when trying to parse the var down to use stdout_lines there are still too many extra items. Below is the output of stdout_lines Any input appreciated just not sure how to parse or what to parse. |
|
@cooktheryan ill try and pull down tomorrow and test a deploy on my environment |
|
@cooktheryan tested and works great. excited to get it going after the INI changes. |
|
GCE Validation PLAY RECAP ********************************************************************* Connection to 35.185.27.235 closed. Deployment is complete. OpenShift Console can be found at https://master.gce-validate.sysdeseng.com |
|
hi all, over last week i've been working on getting OS Origin on CentOS running on VMware. Through that process i found few issues.... Looking at this chunk it sounds i should better hold pushing any PRs, how far you guys think this PR is from being merged? |
|
Looking at tomorrow/monday for merging. We just need to run it through the
providers 1 last time before merging.
…On Thu, Jan 12, 2017 at 5:11 PM, Dani Comnea ***@***.***> wrote:
hi all, over last week i've been working on getting OS Origin on CentOS
running on VMware. Through that process i found few issues....
Looking at this chunk it sounds i should better hold pushing any PRs, how
far you guys think this PR is from being merged?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#126 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADoslHk71pY2ZQszFRZsZKAqo7ICNsIKks5rRqUSgaJpZM4K5kfq>
.
|
|
@cooktheryan perfect, thanks for quick response 👍 |
|
@DanyC97 hey man. I did a lot of work on VMware as a provider ping me if I can help with your CentOS deploy |
|
@dav1x thanks you for the offer, definitely i'll need your help 👍 so my confusion comes from few things:
I'll go tomorrow to try and redeploy from scratch using CentOS on VMware and latest changes you guys done so i can validate it. |
* Making providers common * moving directory locations * using links and removal of vars file callout * rename of file * went block crazy * cleanup * add to remove * missing Pyyaml package in README * let docker actually setup docker storage and start the service * name change * Fix for vmware. Will variablize in the future * catchup to test common providers against master * should only be schedulable nodes
I will need testing done from @dav1x @themurph and/or @pschiffe
This is the first big chunk of work to make the providers common this should benefit OSP and Azure in the future and ensure that a change made on one common role is applied to all groups.