From 5561df1b1d340a80359c353e6de08af0726e74a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Bompard?= Date: Wed, 25 May 2022 18:42:42 +0200 Subject: [PATCH] Initial attempt at hosting ipsilon-project.org. Not functional at the moment. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Aurélien Bompard --- playbooks/openshift-apps/ipsilon-website.yml | 49 ++++++++++++++++ .../ipsilon-website/files/service.yml | 14 +++++ .../ipsilon-website/templates/buildconfig.yml | 24 ++++++++ .../templates/deploymentconfig.yml | 58 +++++++++++++++++++ 4 files changed, 145 insertions(+) create mode 100644 playbooks/openshift-apps/ipsilon-website.yml create mode 100644 roles/openshift-apps/ipsilon-website/files/service.yml create mode 100644 roles/openshift-apps/ipsilon-website/templates/buildconfig.yml create mode 100644 roles/openshift-apps/ipsilon-website/templates/deploymentconfig.yml diff --git a/playbooks/openshift-apps/ipsilon-website.yml b/playbooks/openshift-apps/ipsilon-website.yml new file mode 100644 index 0000000000..79603fb7a9 --- /dev/null +++ b/playbooks/openshift-apps/ipsilon-website.yml @@ -0,0 +1,49 @@ +- name: make the app be real + hosts: os_control_stg[0]:os_control[0] + user: root + gather_facts: False + + vars_files: + - /srv/web/infra/ansible/vars/global.yml + - "/srv/private/ansible/vars.yml" + - /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml + + vars: + + roles: + - role: openshift/project + app: ipsilon-website + description: "ipsilon-project.org" + appowners: + - abompard + - puiterwijk + tags: + - apply-appowners + + - role: openshift/imagestream + app: ipsilon-website + imagename: ipsilon-website + + - role: openshift/object + app: ipsilon-website + template: buildconfig.yml + objectname: buildconfig.yml + + - role: openshift/object + app: ipsilon-website + file: service.yml + objectname: service.yml + + - role: openshift/route + app: ipsilon-website + routename: web + host: "ipsilon-website.apps.ocp{{ env_suffix }}.fedoraproject.org" + serviceport: web + servicename: web + annotations: + haproxy.router.openshift.io/timeout: 5m + + - role: openshift/object + app: ipsilon-website + template: deploymentconfig.yml + objectname: deploymentconfig.yml diff --git a/roles/openshift-apps/ipsilon-website/files/service.yml b/roles/openshift-apps/ipsilon-website/files/service.yml new file mode 100644 index 0000000000..cebe301b6b --- /dev/null +++ b/roles/openshift-apps/ipsilon-website/files/service.yml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + name: web + labels: + app: ipsilon-website +spec: + ports: + - name: web + port: 8080 + targetPort: 8080 + selector: + app: ipsilon-website + deploymentconfig: web diff --git a/roles/openshift-apps/ipsilon-website/templates/buildconfig.yml b/roles/openshift-apps/ipsilon-website/templates/buildconfig.yml new file mode 100644 index 0000000000..3cf52e299d --- /dev/null +++ b/roles/openshift-apps/ipsilon-website/templates/buildconfig.yml @@ -0,0 +1,24 @@ +apiVersion: build.openshift.io/v1 +kind: BuildConfig +metadata: + name: web + labels: + app: ipsilon-website + build: ipsilon-website +spec: + runPolicy: Serial + source: + type: Git + git: + uri: https://pagure.io/ipsilon-website.git + ref: master + contextDir: / + strategy: + type: Docker + output: + to: + kind: ImageStreamTag + name: ipsilon-website:latest + triggers: + - type: ConfigChange + - type: ImageChange diff --git a/roles/openshift-apps/ipsilon-website/templates/deploymentconfig.yml b/roles/openshift-apps/ipsilon-website/templates/deploymentconfig.yml new file mode 100644 index 0000000000..9bc75a0d02 --- /dev/null +++ b/roles/openshift-apps/ipsilon-website/templates/deploymentconfig.yml @@ -0,0 +1,58 @@ +apiVersion: apps.openshift.io/v1 +kind: DeploymentConfig +metadata: + name: web + labels: + app: ipsilon-website +spec: + replicas: 1 + selector: + app: ipsilon-website + deploymentconfig: web + strategy: + type: Rolling + activeDeadlineSeconds: 21600 + rollingParams: + intervalSeconds: 1 + maxSurge: 25% + maxUnavailable: 25% + timeoutSeconds: 600 + updatePeriodSeconds: 1 + template: + metadata: + creationTimestamp: null + labels: + app: ipsilon-website + deploymentconfig: web + spec: + containers: + - name: ipsilon-website + imagePullPolicy: Always + ports: + - containerPort: 8080 + #protocol: TCP + readinessProbe: + timeoutSeconds: 5 + initialDelaySeconds: 30 + httpGet: + path: / + port: 8080 + livenessProbe: + timeoutSeconds: 5 + initialDelaySeconds: 30 + httpGet: + path: / + port: 8080 + #resources: {} + #terminationMessagePath: /dev/termination-log + #terminationMessagePolicy: File + triggers: + - type: ConfigChange + - type: ImageChange + imageChangeParams: + automatic: true + containerNames: + - ipsilon-website + from: + kind: ImageStreamTag + name: ipsilon-website:latest