-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Develop ancillaryrh7 #368
base: develop
Are you sure you want to change the base?
Develop ancillaryrh7 #368
Conversation
- name: Extract repo to destination point | ||
shell: tar xvf /tmp/ancilRH7_repo.tar.gz -C /opt/ancillary_local | ||
- name: Extract OpenOffice 4.1.6 | ||
shell: tar xvf /opt/ancillary_local/Apache_OpenOffice_4.1.6_Linux_x86-64_install-rpm_en-US.tar.gz -C /opt/ancillary_local/OO416 |
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.
@lel99999 I think these tar files should be in the /artifacts folder on the jenkins machine
@@ -0,0 +1,142 @@ | |||
- hosts: wdcreancil02 |
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.
@lel99999 I think we want to merge this into the deploy_researcher_environment.yml file, and either add these tasks as roles in the research_ancillary_services hosts section, or make a new section for research_ancillary_services_rh7.
command: "/usr/bin/subscription-manager register --username {{ _uid }} --password {{ _pwd }} --auto-attach" | ||
when: _uid != "" and _pwd != "" | ||
# command: "/usr/bin/subscription-manager register --username <name> --password <password> --auto-attach" | ||
- name: register RHEL7 repo |
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.
@lel99999 is this necessary in prod, or should we be using the satellite managed by SE?
shell: tar xvf /opt/ancillary_local/sublime_text_3_build_3207_x64.tar.bz2 -C /opt/ancillary_local/Sublime3 | ||
|
||
- name: Extract Sublime3 to install dir | ||
shell: tar xvf /opt/ancillary_local/sublime_text_3_build_3207_x64.tar.bz2 -C /usr/local/sublime |
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.
@lel99999 should there be 2 extract tasks for sublime??
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.
Also, shouldn't we be using the existing sublime role? or a new sublime_rhe7 one if the install is different/requires other dependencies for rh7?
name=localrepo | ||
baseurl=file:///opt/ancillary_local/OO416 | ||
enabled=1 | ||
gpgcheck=0' >> /etc/yum.repos.d/local.repo |
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.
@lel99999 What is the local repo for?
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 local repo duplicates the /artifacts functionality ... will upload there and mark as resolved.
shell: wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm -O /tmp/epel-release-latest-7.noarch.rpm | ||
- name: Install epel | ||
shell: yum -y localinstall /tmp/epel*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.
Are these dependencies or part of the Ancillary services? Might be a good idea to group all dependencies that can be yum installed, and adding them in one task and using with_items:
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.
have added an epel7 role, so will replace this with that role
# name: python27-python-pip | ||
# state: latest | ||
- name: Install python 3.6 and pip | ||
shell: yum install -y python36 python36-pip |
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.
Shouldn't we be calling the python3 role for this, not installing python separately?
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 a specific directive for RHEL7, it could be placed in a role, but we probably would have to make more fine-grained than python3, probably will have to spell out python3.6, etc.
|
||
- name: Extract repo to destination point | ||
shell: tar xvf /tmp/ancilRH7_repo.tar.gz -C /opt/ancillary_local | ||
- name: Extract OpenOffice 4.1.6 |
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.
Shouldn't we use the existing open_office role for this?
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.
@lel @stirlingv Yep, use existing roles when possible.
- sublime3 | ||
# - ultra-edit | ||
- ultra-editRH7 | ||
- texliveRH7 |
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.
@lel99999 Why are we calling these roles for the local install, but not the prod deployment? Looks like in prod we're deploying each role as a task in the playbook. I think we prefer to break them into roles.
Also, why are there two separate playbooks for local and prod - typically we've used the when: custom_repo tag to be a determination between prod and local development.
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.
just a marker to work out the diffs and conditionals before a single playbook covering multiple scenarios are integrated
- texliveRH7 | ||
|
||
post_tasks: | ||
# - name: Install texlive |
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.
@lel99999 probably want to remove commented out code throughout.
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.
@lel99999 Left some comments in addition to @stirlingv's comments, can you review? Thanks!
@@ -352,6 +352,26 @@ Vagrant.configure(2) do |config| | |||
server.vm.network :private_network, ip: "10.0.1.18" | |||
end | |||
|
|||
# Research ancillary server1 on RedHat 7.5 and above | |||
config.vm.define :research_ancillary1_services do |server| | |||
# server.vm.box = "bento/centos-6.10" |
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.
@lel99999 Could you remove commented out lines? Also, to stick with previous conventions please call this config research_ancillary_services_7
server.ssh.forward_agent = true | ||
|
||
server.vm.provision "ansible" do |ansible| | ||
ansible.playbook = "deploy_ancillaryRH7.dev_local" |
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.
@lel99999 We should not have separate playbooks for local and production, the same playbooks should be used and controlled by variables that can be overwritten.
pre_tasks: | ||
- debug: | ||
msg: "Variables: _uid = {{ _uid }}, _pwd = **********" | ||
# msg: "Variables: _uid = {{ _uid }}, _pwd = {{ _pwd }}" |
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.
@lel99999 Remove debug code
@@ -0,0 +1,142 @@ | |||
- hosts: wdcreancil02 | |||
vars: | |||
custom_repo: 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.
@lel99999 We do not want to hard-code custom_repo
to be true, it should only be true in remote environments.
shell: yum -y groupinstall "X Window System" | ||
|
||
- name: install XFCE | ||
shell: yum -y groupinstall "xfce" |
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.
@lel99999 I don't think we need to install xfce
on the Ancillary, since the desktop lives on EOD and apps are connected to via X11 forwarding only.
shell: yum -y install evince | ||
|
||
- name: Install python-pip | ||
shell: yum install -y python27 python-pip |
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.
@lel99999 There's already a role for python, we should use that instead.
# name: python27-python-pip | ||
# state: latest | ||
- name: Install python 3.6 and pip | ||
shell: yum install -y python36 python36-pip |
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.
@lel99999 Same here, there's a role for python3 that should be used.
shell: mkdir -p /opt/ancillary_local/OO416 | ||
- name: make Sublime3 directory | ||
shell: mkdir -p /opt/ancillary_local/Sublime3 | ||
- name: make Sublime3 install directory |
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.
@lel99999 What are these folders for?
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.
folders are for custom local repo to stage installation files like /artifacts, will update to use /artifacts instead
|
||
- name: Extract repo to destination point | ||
shell: tar xvf /tmp/ancilRH7_repo.tar.gz -C /opt/ancillary_local | ||
- name: Extract OpenOffice 4.1.6 |
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.
@lel @stirlingv Yep, use existing roles when possible.
stattransfer_major_version: "14" | ||
stattransfer_name: "STAT-TRANSFER-NAME" | ||
stattransfer_organization: "STAT-TRANSFER-ORGANIZATION" | ||
stattransfer_set_code: "STAT-TRANSFER-SET-CODE" |
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.
@lel99999 Ideally we won't have a new role for stattransfer14 vs 13, just update the existing role with the new variable values. That way we can control both versions using the same role while incrementally upgrading machines.
- UltraEdit-15.1-0.8.x86_64 | ||
|
||
ue_install_version: UltraEdit-18.0-0.40.el7.x86_64 | ||
ue_install_rpm: UltraEdit-18.0-0.40.el7.x86_64.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.
@lel99999 did you add this rpm to the SE repo for managed rpms? Typically we prefer to yum install that way, rather than from source ourselves.
- UltraEdit | ||
|
||
- name: Install Ultra Edit | ||
shell: yum localinstall -y {{ ue_install_dir }}/{{ ue_install_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.
@lel99999 see comment above. We want to send SE the RPM so that can add it to RH satellite.
shell: yum -y groupinstall "xfce" | ||
|
||
- name: install Evince | ||
shell: yum -y install evince |
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.
There is a whole role for this, that seems to require installing many more dependencies. I'm going to remove this and call the evince role.
shell: pip install gdown | ||
# yum: | ||
# name: python27-python-pip | ||
# state: latest |
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.
@lel99999 we should call the python27 role here.
CentOS6 -> RHEL7.x
Require free developer subscription: https://developers.redhat.com/blog/2016/03/31/no-cost-rhel-developer-subscription-now-available/
_uid: <name>@<domain>
_pwd: <pwd>