Skip to content
This repository has been archived by the owner on Dec 7, 2022. It is now read-only.

[WIP] Add an Openshift template #44

Open
wants to merge 4 commits into
base: docker
Choose a base branch
from
Open

Conversation

vrutkovs
Copy link

This PR also includes several modifications to make it runnable on Openshift

@mention-bot
Copy link

@vrutkovs, thanks for your PR! By analyzing the history of the files in this pull request, we identified @mhrivnak, @aweiteka and @smapjb to be potential reviewers.

Copy link
Contributor

@aweiteka aweiteka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! It would be good to have an accompanying README for deploying this. There are several prereq's: priv scc, perms to create volumes and associated quota. Once we get this in it would be ideal to use OpenShift's mongo image. The init prepare pod is a bit of a kubernetes antipattern but too much to deal with in this PR.

@vrutkovs vrutkovs changed the title Add an Openshift template [WIP] Add an Openshift template Feb 14, 2017
command: ["bash", "-c", "/setup.sh"]
env:
- name: QPID
value: qpid.${NAMESPACE}.svc.cluster.local
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should be able to use value: qpid

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weird, that didn't work for me, but maybe SDN was not installed on a test cluster

- name: QPID
value: qpid.${NAMESPACE}.svc.cluster.local
- name: DB
value: db.${NAMESPACE}.svc.cluster.local
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

value: db

@vrutkovs
Copy link
Author

vrutkovs commented Feb 14, 2017

I tested this a little bit more and still some modifications are required:

  • A proper README.md
    It should contain a notice about privileged scc, volumes wtc.
    Does Openshift has any suggested format for this?
  • Use Openshift's Mongo image if possible
  • Convert prepare pod into a script, which would run in pulpapi is not configured
    Had to use a separate DeploymentConfig for this, as pre hook for Rolling strategy doesn't support runAsUser

@mhrivnak
Copy link
Contributor

Interesting work! What do you think about this related alternative? https://github.com/mhrivnak/pulp-k8s

I started from scratch there. I abandoned the idea of "shared config == shared volume", which I used the first time around since I didn't have an orchestration layer. This time I used the Secrets and ConfigMap features of k8s to inject configs and certificates.

@vrutkovs
Copy link
Author

Looks great! I'm thinking to abandon this PR in favor of pulp-k8s - your repo is much more advanced for production use (shared volume for configs is not really a good idea).

My initial goal was to run Pulp for OSBS development, so feel free to close this PR if its not sufficiently advanced for actual production or development use

@aweiteka
Copy link
Contributor

aweiteka commented Mar 1, 2017

This time I used the Secrets and ConfigMap features of k8s to inject configs and certificates.

Definitely the preferred method.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants