Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- This documentation is created as a guide to launch Accenture DevOps Platform Tools in an OpenShift cluster.
- **Installation Variables Setup**
- Create a shell executable file and enter the following information. This will set the variables that will be use across all container deployments in this Documentation. Change the values accordingly specially the passwords.
- ```bash
- export INITIAL_ADMIN_USER=adop
- export INITIAL_ADMIN_PASSWORD_PLAIN=adop
- export INITIAL_ADMIN_PASSWORD_BASE64=$(echo ${INITIAL_ADMIN_PASSWORD_PLAIN} | base64)
- export JENKINS_PASSWORD_PLAIN=jenkins
- export JENKINS_PASSWORD_BASE64=$(echo ${JENKINS_PASSWORD_PLAIN} | base64)
- export GERRIT_PASSWORD_PLAIN=gerrit
- export GERRIT_PASSWORD_BASE64=$(echo ${GERRIT_PASSWORD_PLAIN} | base64) # we are not using gerrit in this guide
- export SONARQUBE_JDBC_USERNAME=sonar
- export SONARQUBE_JDBC_PASSWORD=sonar
- export SONARQUBE_MYSQL_ROOT_PASSWORD=sonar
- export GITLAB_POSTGRESQL_USER=gitlab_postgres
- export GITLAB_POSTGRESQL_PASSWORD=gitlab_postgres
- export GITLAB_POSTGRESQL_ADMIN_PASSWORD=gitlab_postgres
- export GITLAB_ROOT_PASSWORD=admin123
- export LDAP_SERVER="YOUR_LDAP_SERVER_IP"
- export LDAP_PORT="389"
- export SLAPD_DOMAIN=ldap.adop.com
- export SLAPD_FULL_DOMAIN="dc=ldap,dc=adop,dc=com"
- export SLAPD_PASSWORD="<YOUR_PASSWORD>"
- export SUB_DOMAIN="apps.<YOUR_EC2IP>.xip.io"
- export NFS_SERVER="<YOUR_NFS_SERVER_IP>"
- export SERVICE_ACCOUNT="adop"
- export GITLAB_SERVICE_ACCOUNT="gitlab"
- export NAMESPACE="adop"
- ```
- Source the shell executable file using the following command:
- ```bash
- source <YOUR_SH_FILE>
- ```
- **Create an OpenShift project**
- The project or namespace name will be $NAMESPACE. After this step, all deployments of docker containers should be done in this openshift project.
- ```bash
- oc new-project $NAMESPACE
- oc project $NAMESPACE
- ```
- **Create a Service Account**
- Create Service Account Resource configuration file.
- ```bash
- cat > serviceAccount.yml <<-EOF
- apiVersion: v1
- kind: ServiceAccount
- metadata:
- name: $SERVICE_ACCOUNT
- EOF
- ```
- Create the service account named `adop`
- ```bash
- oc create -f serviceAccount.yml
- ```
- Check the service account using `oc get sa`.
- Add the privilege to run as `anyuid` to `$SERVICE_ACCOUNT`.
- ```bash
- oc adm policy add-scc-to-user anyuid -z $SERVICE_ACCOUNT
- ```
- ## NFS
- All the persistent storage of docker containers will be stored on an NFS mounted devices. In this guide the directory that will be used is /openshift_nfs/ and NFS server is $NFS_SERVER.
- Ensure that NFS is started.
- ```bash
- systemctl start nfs
- ```
- Ensure that SELinux allows writing to exported directories.
- ```bash
- setsebool -P virt_use_nfs 1
- setsebool -P virt_sandbox_use_nfs 1
- ```
- Ensure that the NFS server allows server traffic.
- ```bash
- # for NFSv4 and NFSv3
- iptables -I INPUT 1 -p tcp --dport 2049 -j ACCEPT
- # for NFSv3 only
- iptables -I INPUT 1 -p tcp --dport 20048 -j ACCEPT
- iptables -I INPUT 1 -p tcp --dport 111 -j ACCEPT
- ```
Add Comment
Please, Sign In to add comment