Skip to content

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

Merged
merged 1 commit into from
Feb 6, 2018
Merged

Update AIX scripts #118

merged 1 commit into from
Feb 6, 2018

Conversation

jdekonin
Copy link
Contributor

@jdekonin jdekonin commented Jan 8, 2018

Signed-off-by: Joe deKoning [email protected]

@@ -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
Copy link
Contributor

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?

Copy link
Contributor Author

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
Copy link
Member

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.

Copy link
Contributor Author

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.

@sxa
Copy link
Member

sxa commented Jan 15, 2018

Is there a reason not to use rpm -Uvh directly with the wget/ftp URLs instead of just giving the URL to rpm? I could understand if we were caching the RPMs in case the playboks but the way it's set up just now there's no checking fo the .rpm files' presence so it'll re-download if you run the script.

@jdekonin
Copy link
Contributor Author

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
Copy link
Member

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?

Copy link
Contributor Author

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
Copy link
Member

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

Copy link
Member

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)

- 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
Copy link
Member

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.

Copy link
Contributor Author

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.

@jdekonin jdekonin force-pushed the master branch 13 times, most recently from b18bae2 to f0d96df Compare January 31, 2018 16:42

- shell: tar -xvf /tmp/openssl-1.0.2.1300.tar -C /tmp/
tags: openssl

Copy link
Contributor Author

@jdekonin jdekonin Jan 31, 2018

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).

Copy link
Member

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/

Copy link
Contributor Author

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.

@jdekonin
Copy link
Contributor Author

I believe this is ready for review. I have this working via ansible tower on AIX releases :

  • 7.1.3.[5|9]
  • 7.1.4.[3|4]
  • 7.2.0.[2|4]
  • 7.2.1.[3|4]

@jdekonin jdekonin changed the title WIP: Update AIX scripts Update AIX scripts Jan 31, 2018

- debug:
msg: "Yum installed, skipping download and installation"
when: yum.stat.islnk is defined
Copy link
Contributor

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

Copy link
Contributor Author

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.

Copy link
Contributor

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

when: yum.stat.islnk is not defined
tags: yum

- name: Ensure the yum package index is up to date
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update made.


################
# Pass or Fail #
################
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update made.

Copy link
Contributor

@bblondin bblondin left a 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]>
@jdekonin
Copy link
Contributor Author

I believe I have commented and/or updated to all responses.

@gdams
Copy link
Member

gdams commented Feb 2, 2018

does this cover the creation of ramdisks? #44

@jdekonin
Copy link
Contributor Author

jdekonin commented Feb 6, 2018

No it does not. Those changes were not made in the previous version. I'd suggest a follow on issue for adding that functionality.

@bblondin bblondin merged commit 96ac528 into adoptium:master Feb 6, 2018
@gdams
Copy link
Member

gdams commented Feb 6, 2018

Can someone create a follow up issue for adding ramdisk?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants