-
-
Notifications
You must be signed in to change notification settings - Fork 101
Update AIX scripts #118
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
Update AIX scripts #118
Conversation
ansible/playbooks/aix.yml
Outdated
@@ -34,7 +34,7 @@ | |||
################################ | |||
- name: Download AIX filesystem configuration script | |||
get_url: | |||
url: https://github.com/raw/AdoptOpenJDK/openjdk-infrastructure/master/ansible/playbooks/scripts/AIX_filesystem_config.sh | |||
url: https://github.com/raw/jdekonin/openjdk-infrastructure/master/ansible/playbooks/scripts/AIX_filesystem_config.sh |
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.
Why are we pointing to your username?
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.
Its the only way I could test, this would need to be changed prior to commit.
I have tested against my own fork and this works only on the 7.1.4 distro as there are version specific rpms. Thats a future todo, if/when further versions are required.
I also encountered an issue with installing/upgrading the zlib rpm. The version (1.2.11-1.aix5.1) commented out is required for openjdk to build, but that version breaks python. My current answer for that is it needs to be performed manually. Not ideal, but then at least the rest of the system setup can be performed via ansible.
rpm -Uvh bash-4.4-3.aix6.1.ppc.rpm | ||
|
||
wget http://www.bullfreeware.com/download/bin/3517/libgcc-6.3.0-1.aix7.1.ppc.rpm | ||
rpm -Uvh libgcc-6.3.0-1.aix7.1.ppc.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.
This failed for me because AIX-rpm saying:
AIX-rpm < 7.2.0.0. is needed by libgcc-6.3.0.1
I have AIX-rpm-7.2.0.1-1
on my system.
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.
Once I have the yum method functioning 100%, which I have very close, this will not be an issue.
Is there a reason not to use |
I actually didn't know it could be done that way until recently, I just hadn't updated the script. I am testing the yum/AIX toolbox method we were discussing via slack. If that works better I am fine with switching to that method. |
wget http://www.bullfreeware.com/download/bin/2536/autoconf-2.69-2.aix6.1.noarch.rpm | ||
rpm -Uvh autoconf-2.69-2.aix6.1.noarch.rpm | ||
|
||
wget http://www.bullfreeware.com/download/bin/3544/vim-common-7.4-2.aix6.1.ppc.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.
What's the reason for installing vim here? Surely it's not a required dependency on a build/test machine?
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.
vi on aix is not user friendly imo, adding vim was simply for the admin. Its not a requirement for a build/test machine.
rpm -Uvh m4-1.4.17-1.aix6.1.ppc.rpm | ||
|
||
wget http://www.bullfreeware.com/download/bin/3555/gettext-0.19.8-1.aix6.1.ppc.rpm | ||
rpm -Uvh --nodeps gettext-0.19.8-1.aix6.1.ppc.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.
This appears to depend on ncurses which is not installed until later
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.
(Comment likely irrelevant with the switch to yum)
ansible/playbooks/aix.yml
Outdated
- name: Create rpm tmp folder /tmp/playbook_tmp/rpms | ||
file: path=/tmp/playbook_tmp/rpms state=directory mode=0755 | ||
- name: Create rpm tmp folder /tmp/playbook_tmp/pkgs | ||
file: path=/tmp/playbook_tmp/pkgs state=directory mode=0755 | ||
tags: layout |
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.
Would this not be better done in the IX_RPM_PKGs_Install.sh script to allow it to be used standalone? There's currently no error checking in the script so if the directory does not exist it's going to wherever it happens to be.
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.
Agreed, I'll be reworking this section and other with checks to permit ansible tower execution more than once and not having the machine left in an unusable state.
b18bae2
to
f0d96df
Compare
ansible/playbooks/aix.yml
Outdated
|
||
- shell: tar -xvf /tmp/openssl-1.0.2.1300.tar -C /tmp/ | ||
tags: openssl | ||
|
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 previous 3 steps could be done in one "unarchive", like I do in other spots in the file, but there is no unzip installed by default, and its not installed until the yum step(s).
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.
Not sure why unzip
is relevant here: This should do it for the last two steps at least: gzip -cd /tmp/openssl-1.0.2.1300.tar.gz | tar xf - -C /tmp/
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 unarchive method can transfer the file and unpack in one step instead of 3 (or 2 with your proposed change) but it depends on unzip. I was simply meaning that I couldn't use the ansible preferred method as the warning when you run it in AWS states "Consider using unarchive module rather than running tar". I simplified with your suggestion.
I believe this is ready for review. I have this working via ansible tower on AIX releases :
|
|
||
- debug: | ||
msg: "Yum installed, skipping download and installation" | ||
when: yum.stat.islnk is defined |
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.
when: yum.stat.islnk is defined
Is yum
a symlink?
islnk | Tells you if the path is a symbolic link | success, path exists and user can read stats | boolean | False
Should it be yum.stat.exists == 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.
Technically, stat is on /usr/bin/yum which is a link to /opt/freeware/bin/yum, both of which are added with the yum.sh 'install'.
I think the method is valid, but I could also change to exists method if you feel strongly about it.
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, that's fine just wanted to confirm
ansible/playbooks/aix.yml
Outdated
when: yum.stat.islnk is not defined | ||
tags: yum | ||
|
||
- name: Ensure the yum package index is up to date |
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 set of commands will update everything to latest not just updating the cache so, I think the title here should be changed
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.
Update made.
ansible/playbooks/aix.yml
Outdated
|
||
################ | ||
# Pass or Fail # | ||
################ |
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 Slack section here can be removed
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.
Update made.
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.
Looks good to me. (next we'll want to reformat it to the newer style layout, but that can be done later)
* filesystem setup for jenkins user in /home * add checks prior to performing task to speed update * replace most all rpm installs with the yum installer Signed-off-by: Joe deKoning <[email protected]>
I believe I have commented and/or updated to all responses. |
does this cover the creation of ramdisks? #44 |
No it does not. Those changes were not made in the previous version. I'd suggest a follow on issue for adding that functionality. |
Can someone create a follow up issue for adding ramdisk? |
Signed-off-by: Joe deKoning [email protected]