Remove nuancier-openshift

Work had started on moving nuancier to openshift, but was never
deployed. This removes this. Nuancier is being shut down.

Signed-off-by: Ryan Lerch <rlerch@redhat.com>
This commit is contained in:
Ryan Lercho 2023-07-06 15:56:50 +10:00 committed by kevin
parent 6bdf014ee6
commit fbc016ebaa
9 changed files with 0 additions and 339 deletions

View file

@ -1,58 +0,0 @@
- name: make the app be real
hosts: os_control_stg[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
roles:
- role: openshift/project
app: nuancier
description: Fedora nuancier apps
appowners:
- kevin
- role: openshift/object
app: nuancier
template: imagestream.yml
objectname: imagestream.yml
- role: openshift/object
app: nuancier
template: buildconfig.yml
objectname: buildconfig.yml
- role: openshift/object
app: nuancier
template: storage.yml
objectname: storage.yml
- role: openshift/object
app: nuancier
template: configmap.yml
objectname: configmap.yml
- role: openshift/start-build
app: nuancier
buildname: nuancier-build
objectname: nuancier-build
- role: openshift/object
app: nuancier
file: service.yml
objectname: service.yml
- role: openshift/route
app: nuancier
routename: nuancier
host: "wallpapers{{ env_suffix }}.fedoraproject.org"
serviceport: 8080-tcp
servicename: nuancier
- role: openshift/object
app: nuancier
file: deploymentconfig.yml
objectname: deploymentconfig.yml

View file

@ -1,74 +0,0 @@
---
apiVersion: v1
kind: DeploymentConfig
metadata:
labels:
app: nuancier
service: nuancier
name: nuancier
spec:
replicas: 1
selector:
app: nuancier
deploymentconfig: nuancier
strategy:
type: Recreate
recreateParams:
# mid:
# failurePolicy: Abort
# execNewPod:
# containerName: nuancier
# command: ["alembic", "upgrade", "head", "-c", "/opt/app-root/config/alembic.ini"]
# env:
# - name: PYTHONPATH
# value: /opt/app-root/src
# volumes:
# - config-volume
template:
metadata:
labels:
app: nuancier
deploymentconfig: nuancier
spec:
containers:
- name: nuancier
image: nuancier:latest
ports:
- containerPort: 8080
resources: {}
volumeMounts:
- name: config-volume
mountPath: /opt/app-root/config/
readOnly: true
- name: data-volume
mountPath: /var/cache/nuancier/
readinessProbe:
timeoutSeconds: 1
initialDelaySeconds: 5
httpGet:
path: /
port: 8080
livenessProbe:
timeoutSeconds: 1
initialDelaySeconds: 30
httpGet:
path: /
port: 8080
volumes:
- name: config-volume
configMap:
name: nuancier-configmap
- name: data-volume
persistentVolumeClaim:
claimName: nuancier-storage
triggers:
- type: ConfigChange
- type: ImageChange
imageChangeParams:
automatic: true
containerNames:
- nuancier
from:
kind: ImageStreamTag
name: nuancier:latest

View file

@ -1,15 +0,0 @@
apiVersion: v1
kind: Service
metadata:
labels:
app: nuancier
name: nuancier
spec:
ports:
- name: 8080-tcp
port: 8080
protocol: TCP
targetPort: 8080
selector:
app: nuancier
deploymentconfig: nuancier

View file

@ -1,54 +0,0 @@
# A generic, single database configuration.
[alembic]
# path to migration scripts
script_location = /opt/app-root/src/nuancier/alembic
# template used to generate migration files
# file_template = %%(rev)s_%%(slug)s
# set to 'true' to run the environment during
# the 'revision' command, regardless of autogenerate
# revision_environment = false
{% if env == 'staging' %}
sqlalchemy.url = postgresql://{{ nuancier_db_admin_user }}:{{ nuancier_db_admin_pass }}@db01.stg.iad2.fedoraproject.org/{{ nuancier_db_name }}
{% else %}
sqlalchemy.url = postgresql://{{ nuancier_db_admin_user }}:{{ nuancier_db_admin_pass }}@db01.iad2.fedoraproject.org/{{ nuancier_db_name }}
{% endif %}
# Logging configuration
[loggers]
keys = root,sqlalchemy,alembic
[handlers]
keys = console
[formatters]
keys = generic
[logger_root]
level = WARN
handlers = console
qualname =
[logger_sqlalchemy]
level = WARN
handlers =
qualname = sqlalchemy.engine
[logger_alembic]
level = INFO
handlers =
qualname = alembic
[handler_console]
class = StreamHandler
args = (sys.stderr,)
level = NOTSET
formatter = generic
[formatter_generic]
format = %(levelname)-5.5s [%(name)s] %(message)s
datefmt = %H:%M:%S

View file

@ -1,30 +0,0 @@
apiVersion: build.openshift.io/v1
kind: BuildConfig
metadata:
name: nuancier-build
labels:
environment: "nuancier"
spec:
output:
to:
kind: ImageStreamTag
name: nuancier:latest
source:
type: Git
git:
uri: https://pagure.io/nuancier.git
{% if env == 'staging' %}
ref: "staging"
{% else %}
ref: "production"
{% endif %}
strategy:
type: Source
sourceStrategy:
from:
kind: ImageStreamTag
namespace: openshift
name: python:2.7
triggers:
- type: ConfigChange
- type: ImageChange

View file

@ -1,13 +0,0 @@
---
apiVersion: v1
kind: ConfigMap
metadata:
name: nuancier-configmap
labels:
app: nuancier
{% macro load_file(filename) %}{% include filename %}{%- endmacro -%}
data:
alembic.ini: |-
{{ load_file('alembic.ini') | indent }}
nuancier.cfg: |-
{{ load_file('nuancier.cfg') | indent }}

View file

@ -1,10 +0,0 @@
---
apiVersion: image.openshift.io/v1
kind: ImageStream
metadata:
name: nuancier
spec:
lookupPolicy:
local: false
status:
dockerImageRepository: ""

View file

@ -1,70 +0,0 @@
# Beware that the quotes around the values are mandatory
import os
### Secret key for the Flask application
SECRET_KEY='{{ nuancier_secret_key }}'
### url to the database server:
{% if env == 'staging' %}
DB_URL='postgresql://{{ nuancier_db_user }}:{{ nuancier_db_pass }}@db01.stg.iad2.fedoraproject.org/{{ nuancier_db_name }}'
{% else %}
DB_URL='postgresql://{{ nuancier_db_user }}:{{ nuancier_db_pass }}@db01.iad2.fedoraproject.org/{{ nuancier_db_name }}'
{% endif %}
### The FAS groups in which the admin of nuancier are
### This can either be a single group or multiple, defined between
### parenthesis.
ADMIN_GROUP=('sysadmin-nuancier', 'sysadmin-main')
# FAS group for the nuancier reviewers
REVIEW_GROUP = ('nuancier-mentors')
# FAS group of users having a higher vote
WEIGHTED_GROUP = ('sysadmin-nuancier', 'designteam')
### Static folder
### The folder containing the css, javascript as well as the pictures
### candidates and the cache of those pictures.
### This directory should be somewhere where apache can access, it's
### proposed in '/var/www/nuancier'
STATIC_FOLDER = '/var/cache/nuancier'
### Pictures folder
### The folder in which are located the pictures of the different elections.
### This folder does not have to be writable by the application but should be
### readable.
### /!\ It should be the full path to this folder
PICTURE_FOLDER = os.path.join(STATIC_FOLDER, 'pictures')
### Cache folder
### The folder in which the application will generate thumbnails of the pictures
### selected for an election.
### This folder *must* be *writable* by the application.
### /!\ It should be the full path to this folder
CACHE_FOLDER = os.path.join(STATIC_FOLDER, 'cache')
### Size of the thumbnails (keeping the ratio)
### In order to reduce the loading page of the election page that might contains
### more than hundreds pictures, the application generates thumbnails of each
### pictures.
### The application will keep the ratio intact and just make sure that either
### length or width of the picture fit the length and width specified below.
THUMB_SIZE = (256, 256)
# This is required to fix login in stg
PREFERRED_URL_SCHEME='https'
# Make browsers send session cookie only via HTTPS
SESSION_COOKIE_SECURE = True
# Used by SESSION_COOKIE_PATH
APPLICATION_ROOT = '/nuancier/'
SESSION_COOKIE_NAME = 'nuancier'
# dogpile.cache configuration to work with memcached
#NUANCIER_CACHE_BACKEND = 'dogpile.cache.memcached'
#NUANCIER_CACHE_KWARGS = {'arguments' : {
# 'url': "127.0.0.1:11211",
# }
#}
NUANCIER_EMAIL_NOTIFICATIONS = True

View file

@ -1,15 +0,0 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: nuancier-storage
spec:
accessModes:
- ReadWriteMany
resources:
requests:
{% if env == 'staging' %}
storage: 10Gi
{% else %}
storage: 20Gi
{% endif %}
storageClassName: ""