redhat-openstack / infrared

Plugin based framework that aims to provide an easy-to-use CLI for Ansible based projects
https://infrared.readthedocs.io/en/latest/index.html
Apache License 2.0
99 stars 97 forks source link

Feature: Allow to deploy OSP from third-party repositories #328

Closed fcharlier closed 6 years ago

fcharlier commented 6 years ago

Hello,

We're evaluating using infrared as a helper to deploy OSP/RDO inside DCI jobs.

The specificity of DCI is that we're enabling selected Red Hat partners to have access to selected unreleased versions of OSP for them to test on their hardware, topologies and with their specific plugins.

To enable this, we are pushing the unreleased OSP repository to their lab so that they can access it.

While trying to use our local repository to deploy the undercloud, I managed to to deploy using an OSP13 repository with the following command-line:

ir tripleo-undercloud --version 13 --images-task rpm -cdn cdn.yml --repos-skip-release True --repos-url http://10.41.11.45/dci_repo/dci_repo.repo

and the following patch to add support for OSP13 with an empty list as OSP specific repositories:

diff --git a/infrared/common/roles/cdn_registery/defaults/main.yml b/infrared/common/roles/cdn_registery/defaults/main.yml                                                                                                      
index 216631b..ef97e65 100644                                                                                                                                                                                                   
--- a/infrared/common/roles/cdn_registery/defaults/main.yml                                                                                                                                                                     
+++ b/infrared/common/roles/cdn_registery/defaults/main.yml                                                                                                                                                                     
@@ -3,6 +3,7 @@ subscriptions:                                                                                                                                                                                                  
         - rhel-7-server-rpms                                                                                                                                                                                                   
         - rhel-7-server-extras-rpms                                                                                                                                                                                            
         - rhel-7-server-rh-common-rpms                                                                                                                                                                                         
+    13: []                                                                                                                                                                                                                     
     12:                                                                                                                                                                                                                        
         - rhel-ha-for-rhel-7-server-rpms                                                                                                                                                                                       
         - rhel-7-server-openstack-12-rpms

Our main constraints compared to what is currently implemented in InfraRed are the following:

Would it be possible to have a command-line parameter to disable installing OSP repositories from the CDN when using the CDN ?

obaranov commented 6 years ago

Hi @fcharlier,

Can you please test your workflow with the following patch: https://review.gerrithub.io/#/c/redhat-openstack/infrared/+/413972

It should ensure that if you have '--repos-skip-release True' flag then Infrared won't install extra openstack cdn repos. Only the custom ones provided by user.

fcharlier commented 6 years ago

Hi @obaranov ,

I'm testing the patch right now.

As in our case, our local repositories provide only the OpenStack bits, would it be possible to keep the registration to the "common" repositories ?

Would it make sense to use the '--repose-skip-release' flag for this or would it require more flags ?

obaranov commented 6 years ago

@fcharlier, I pushed another patch set to add only common cdn repos. I think that should fix dependency problem. Can you plz retry?

obaranov commented 6 years ago

yup). I did pretty the similar fix here: https://review.gerrithub.io/#/c/redhat-openstack/infrared/+/413972/4/infrared/common/roles/cdn_registery/tasks/main.yml

fcharlier commented 6 years ago

@obaranov Thanks! The tripleo-undercloud task finished successfully with this patch.

I verified, only the 'common' repositories and ou local repository are enabled as expected.

:+1: