AIX Open Source

 View Only

 Installed DNF to NIM, created Repository - how to install packages to other servers?

Dana Pettus's profile image
Dana Pettus posted Wed November 13, 2024 03:40 PM

Hi!

I used the provided AIX Toolbox script and configured DNF and loaded all the repositories to my NIM servers in each of my environments.  DNF is not installed on any of my production servers, which cannot have internet access.

How do I use the NIM repository to install DNF and other packages like tmux or screen for example on the other non-internet enabled servers?

I have googled, and searched the forums - I find a lot of posts about installing DNF and creating the repository, but nothing about actually using it yet, it is likely buried under "similar" results.

Thank you in advance for any tips/links you can share to help with this!

Dana

Michael Davison's profile image
Michael Davison IBM Champion

If I am not mistaken (and I am no expert) you will still need to install dnf on all your servers and then use the NIM as the repository and 'pull' the install/updates using dnf on the server from the NIM.  Unlike NIM which can 'push' an update to an AIX server.  All the NIM is doing with regards dnf is acting as a repository.  I am sure someone more knowledgeable will be along shortly to confirm or deny this.... :-)

https://community.ibm.com/community/user/power/blogs/sangamesh-mallayya1/2022/02/09/creating-local-repo-with-dnf-and-aix-toolbox-media

SANGAMESH MALLAYYA's profile image
SANGAMESH MALLAYYA

Yes. As @Michael Davidson mentioned you still need to install DNF on other servers too.

You can refer this article and check the section "Create a local DNF repository"

 

Dana Pettus's profile image
Dana Pettus

As I said in the OP, I have DNF and all the repositories on 3 NIM servers already - I need just DNF installed on my non-internet enabled servers so I can use the repository.

By editing the dnf_aixtoolbox.sh script and deleting the rm -rf $tmpdir entries and removing the last two installation segments, I was able to download the dnf package for OS 7.2 to a dev server (My NIMs are 7.3) and scp it to a server without internet or dnf and get dnf installed.  Now I can configure dnf.conf on the servers to point to the NIM for their environment as the repository.  :)

Thank you for the answers!

Thiru Naidoo's profile image
Thiru Naidoo

I have the same question.

I setup my NIM using the local repo option, it works well.

[nim01] / # dnf repolist
repo id                                              repo name
Local_AIX_Toolbox                                    Local AIX generic repository
Local_AIX_Toolbox_73                                 Local AIX 7.3 specific repository
Local_AIX_Toolbox_noarch                             Local AIX noarch repository
[nim01] / #

I have also NFS shared the Toolbox repository, to make it available to Repo clients.

[nim01] / # lsnfsexp /TOOLBOX
/TOOLBOX -sec=sys:none,rw
[nim01] / #

I am having trouble on the repo clients installing the dnf package:

[sandACEap01] /tmp/DNF # ./dnf_aixtoolbox.sh -d
Attempting download of dnf_bundle_aix_73.tar ...
lwp-download: 500 Can't connect to public.dhe.ibm.com:443 (Connection timed out)
Failed to download dnf_bundle_aix_73.tar
[sandACEap01] /tmp/DNF # 

I have the bundles available locally:

dnf_bundle.tar
dnf_bundle_aix_73.tar

How do I point the script to use the local copies, instead of trying to connect over the Internet?

Mike Pezeur's profile image
Mike Pezeur

ok like most of us our AIX servers don't have external internet connectivity

As the links, posted by others, stated, I setup dnf on our dev NIM server, with the local toolbox repos installed

our ansible AAP is running on rhel, so the next step is to configure the AAP server to sync the repo to my nim server, to get these repos?

then, would the next step be to implement ansible playbook(s) to have dnf installed (using the power_ibm collection?)

if that is correct, taking a look at that collection's role for bootstrapping (installing dnf) has this in the main.yml

power_aix_bootstrap_rpm_repo_src: ftp://ftp.software.ibm.com/aix/freeSoftware/aixtoolbox/INSTALLP/ppc
power_aix_bootstrap_rpm_src: rpm.rte
power_aix_bootstrap_yum_repo_src: ftp://ftp.software.ibm.com/aix/freeSoftware/aixtoolbox/ezinstall/ppc
power_aix_bootstrap_dnf_src_71_72: dnf_bundle_aix_71_72.tar
power_aix_bootstrap_dnf_src_73: dnf_bundle_aix_73.tar
power_aix_bootstrap_dnf_install_script: dnf_installer.sh
power_aix_bootstrap_proxy: None
how would that file get updated to install dnf from the nim server repo, and not try to download from ibm every time?
Nitish Mishra's profile image
Nitish Mishra

Hi @Dana Pettus !

The ansible role you are referring to (power_aix bootstrapping) downloads all the files from IBM public.dhe location only and currently there is no way you can download files from any other location using Ansible. However, we have taken a note of it and opened an issue here to track:

https://github.com/IBM/ansible-power-aix/issues/643 

You can comment on above link to provide more info, if you want to.
As of now you can write an ansible playbook which contains following 5 tasks and run on your controller node (RHEL system in your case):
1. Run wget to download tar file (dnf_bundle_aix_71_72.tar or dnf_bundle_aix_73.tar) from NIM server (local repo) to your controller node.
2. Copy the downloaded tar file to the target node
3. Extract the tar file.
4. Run the dnf_install script inside the tar.
5. Edit dnf.conf file.
If you are facing any issue in successfully writing the above playbook then please track the newly opened git hub issue, we will provide the fix by next week via ansible collection.

Mike Pezeur's profile image
Mike Pezeur

@Nitish,

do you have any update on when this fix may be available ?

The ansible role you are referring to (power_aix bootstrapping) downloads all the files from IBM public.dhe location only and currently there is no way you can download files from any other location using Ansible. However, we have taken a note of it and opened an issue here to track:

https://github.com/IBM/ansible-power-aix/issues/643 

You can comment on above link to provide more info, if you want to.
As of now you can write an ansible playbook which contains following 5 tasks and run on your controller node (RHEL system in your case):
1. Run wget to download tar file (dnf_bundle_aix_71_72.tar or dnf_bundle_aix_73.tar) from NIM server (local repo) to your controller node.
2. Copy the downloaded tar file to the target node
3. Extract the tar file.
4. Run the dnf_install script inside the tar.
5. Edit dnf.conf file.
If you are facing any issue in successfully writing the above playbook then please track the newly opened git hub issue, we will provide the fix by next week via ansible collection.