Blame docs/operations/ci/adding_cico_tenant/adding_cico_tenants.md

792b29
# CentOS CI - On-boarding
792b29
792b29
Note to users:
792b29
792b29
Please note that Infra space is for Fedora and CentOS related projects to
792b29
consume. Decision may take some time (often up to 2 weeks) as these are decided
792b29
by the whole team.
792b29
Once decided as go, we will create you a namespace in a openshift cluster where
792b29
you can configure your CI. We do provide a Jenkins template in case you want to be
792b29
able to consume vms/baremetal nodes to perform your CI.
792b29
792b29
Please answer the following questions so that we understand your requirement.
792b29
792b29
* How does your project relates to Fedora/CentOS?
792b29
* Describe your work flow and if you need any special permissions (other than
792b29
  admin access to namespace), please tell us and provide a reason for them.
792b29
* Do you need bare-metal/vms checkout capability? (we prefer your workflow
792b29
  containerized)
792b29
* Resources required
792b29
  * PVs:
792b29
792b29
```
792b29
Project_name:
792b29
Project_members:
792b29
 - user1@ACO_registered_email_address
792b29
 - user2@ACO_registered_email_address
792b29
```
792b29
792b29
## Steps
792b29
1. Create an OpenShift namespace
792b29
2. Create an entry in duffy db (with ssh key) - follow adding-duffy-api-key.md
792b29
3. Instantiate a template to provision Jenkins
792b29
792b29
792b29
### Create an OpenShift namespace
792b29
792b29
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).
792b29
792b29
Store it in project directory to and push it to git
792b29
792b29
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`
792b29
792b29
Example: "ansible-playbook playbooks/adhoc-openshift-resources.yaml -e "host=ocp-ci-management" -e "@important_project.yaml""
792b29
792b29
792b29
## Create an entry in duffy db (with ssh key) - [follow adding-duffy-api-key.md](https://docs.infra.centos.org/operations/ci/adding_cico_tenant/adding-duffy-api-key/)
792b29
792b29
## Instantiate a template to provision Jenkins
792b29
* Login to openshift
792b29
* Go to project cico-templates to select the cico-workspace Jenkins template
792b29
  from workloads -> From Catalog -> {search cico-workspace}
792b29
  you would see a template called "cico-workspace: provided by The CentOS
792b29
  Project"
792b29
* Click the template to start instantiation process.
792b29
  * Select the namespace we want to run Jenkins in (In Namespace variable)
792b29
  * Enter appropriate Memory limit and volume capacity (for Jenkins, we prefer 3Gi and 10Gi respectively)
792b29
  * Enter duffy API key for the project and SSH private key whose public pair is in duffy db.
792b29
792b29
Click create to instantiate the project.
792b29
792b29
Admin's hack: Increase timeout in deployment config to counter our slow storage timeout issue.