Text Blame History Raw

CentOS CI - On-boarding

Note to users:

Please note that Infra space is for Fedora and CentOS related projects to consume. Decision may take some time (often up to 2 weeks) as these are decided by the whole team. Once decided as go, we will create you a namespace in a openshift cluster where you can configure your CI. We do provide a Jenkins template in case you want to be able to consume vms/baremetal nodes to perform your CI.

Please answer the following questions so that we understand your requirement.

  • How does your project relates to Fedora/CentOS?
  • Describe your work flow and if you need any special permissions (other than admin access to namespace), please tell us and provide a reason for them.
  • Do you need bare-metal/vms checkout capability? (we prefer your workflow containerized)
  • Resources required
  • PVs:
Project_name:
Project_members:
 - user1@ACO_registered_email_address
 - user2@ACO_registered_email_address

Steps

  1. Create an OpenShift namespace
  2. Create an entry in duffy db (with ssh key) - follow adding-duffy-api-key.md
  3. Create a PV(Persistent Volume) for Jenkins instance
  4. Instantiate a template to provision Jenkins

Create an OpenShift namespace

Using the data provided by tenant (i.e. Project name and its admins), create an yaml file to be passed to ansible-playbook (example above).

Store it in the (private) projects directory to and push it to git

Use playbook (adhoc-openshift-resources.yaml)[https://github.com/CentOS/ansible-infra-playbooks/blob/staging/adhoc-openshift-resources.yaml] with variables host=openshift-ci-management and the file containing project name and admins

Example: "ansible-playbook playbooks/adhoc-openshift-resources.yaml -e "host=ocp-ci-management" -e "@important_project.yaml""

Note

If you need to also modify members and/or email addresses, you can just follow the same process and replay the same playbook : that will reflect changes in openshift. If you need access to that private git repository (to be fixed and moved elsewhere in the official centos namespace, reach out to another infra team member

Create an entry in duffy db (with ssh key) - follow adding-duffy-api-key.md

Create a PV(Persistent Volume) for Jenkins instance

The default PV size for Jenkins instance is 10Gi. If a volume of a different size is created it will need to be reflected in the next section

To create the PV follow Persistent storage via NFS. The host will be ocp-ci-management

Instantiate a template to provision Jenkins

  • Login to openshift
  • Ensure you are in Developer mode and select +Add from the menu
  • At the top select the Project cico-templates from the dropdown
  • Under the Developer Catalog section select All Services
  • Enter cico-workspace in the search field you will see a template called "cico-workspace: provided by The CentOS Project"
  • Click the template to start instantiation process.
  • Select the namespace we want to run Jenkins in (In Namespace variable)
  • Enter appropriate Memory limit and volume capacity (for Jenkins, we prefer 3Gi and 10Gi respectively)
  • Enter duffy API key for the project and SSH private key whose public pair is in duffy db.

Click create to instantiate the project.

Admin's hack: Increase timeout in deployment config to counter our slow storage timeout issue.