Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploying Foreman and Katello on OpenShift Origin V3 #349

Closed
wants to merge 81 commits into from

Conversation

ehelms
Copy link
Member

@ehelms ehelms commented Dec 29, 2016

This work is a work in progress to explore the ability to deploy Foreman and Katello on to an OpenShift V3 (container and Kubernetes based environment) environment to explore harnessing the power of the OpenShift platform to manage the application and scale out.

For more detailed information on this deployment, how to use, test and contribute see the README (https://github.com/ehelms/forklift/blob/openshift/openshift/README.md).

This work combines work built on top of the foreman-docker-compose repository (https://github.com/shlomizadok/foreman-docker-compose) along with previous work by the Pulp and Candlepin teams to build out images for use on OpenShift. This also pulls in a starter repo (https://github.com/ehelms/foreman-openshift) that was used to hold initial work on the OpenShift piece.

I have initially pulled the aforementioned repositories into a PR to Forklift (using git subtree to preserve the history) for a few reasons:

  • Forklift's goal is around putting Foreman into user and developer environments
  • Forklift has a broader audience than a new set of repositories and branches would have
  • To get more eyes and interest on this idea for deploying Foreman

If others feel this would be better maintained in a separate repository, I'm open to that discussion with the hope that the previous reasons will be thoughtfully considered with respect on how to position this.

shlomizadok and others added 30 commits July 7, 2016 09:01
- switched foreman/proxy to fedora image
- added a client fact uploading
- db is now saved outside of the container

docker compose scale foreman=2 (or how many instances you want)
docker compose up -d # first time will take a while
Replaced the MAINTAINER instruction with LABEL
(read more here: moby/moby#25466).
In addition, added the maintainer details if they were missing.
Use LABEL to specify the maintainer
Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

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

I ran into the issue that it needed sudo on localhost which doesn't feel right.

After that I ran into the problem that ansible/roles/puppet/files/puppet-template.yaml does not exist. Forgot to git add?


There are two aspects to the deployment: the default images and templates being loaded into OpenShift and creating the Foreman deployment. All of this is handled by a convenient playbook provided. You can view the configuration of the Foreman deployment itself by looking in the `templates/foreman.yaml` file. To create the application:

ansible-playbook ansible/playbooks/foreman.yaml
Copy link
Member

Choose a reason for hiding this comment

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

File is called .yml


- name: 'Create .tmp directory'
file:
path: .tmp
Copy link
Member

Choose a reason for hiding this comment

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

I had to add state: directory

@ehelms
Copy link
Member Author

ehelms commented Jan 21, 2017

Thanks for the feedback so far @ekohl . I made changes based on your comments. There was a top level gitignore that was blocking the puppet role file from being added - fixed now. I also removed sudo from the volume creation. Volume creation and management is one of the trickier aspects. At this point, I've taken the approach of creating a local directory with subpaths for each volume "store" needed by the various services.

Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

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

My builds now fail because it can't resolve github.com. I don't know enough about openshift to properly debug it.


## Creating the Foreman Deployment

There are two aspects to the deployment: the default images and templates being loaded into OpenShift and creating the Foreman deployment. All of this is handled by a convenient playbook provided. You can view the configuration of the Foreman deployment itself by looking in the `templates/foreman.yaml` file. To create the application:
Copy link
Member

Choose a reason for hiding this comment

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

This should also be .yml

@ehelms
Copy link
Member Author

ehelms commented Jan 21, 2017

Thanks @ekohl - updated based on your comments.

A few things I wouldn't mind some feedback on:

  1. currently I am tracking TODOs in the README on this PR, I was thinking about either:
    a) having this live in its own repository and using github issues to manage the todos
    b) using this repo (since this is sorta Forklift's mission) and using github issues + milestone for openshift work to track

  2. creating an RFC either contained here with this PR and work or as part of the official RFC repo

@ekohl
Copy link
Member

ekohl commented Jan 22, 2017

I wouldn't mind if this lived in this repo, but we already have quite a few ways this repo can be used and we need to cut down on it and focus the documentation. As someone new to the repo it's hard to figure out what you can and can't do with it. Before we add more, we need to simplify it first. A few steps that I'd think of:

Split the top directory into subdirs

Some candidates I see

  • bats
  • vagrant
  • openshift
  • docker

Remove deprecated things

  • Nuke setup.rb

@ehelms
Copy link
Member Author

ehelms commented Jan 23, 2017

That sounds reasonable as a first good step to re-organize the top level (unless you think it should be part of this change only). The top level docker repository I don't know if anyone outside of myself even uses at this point. There is also a docker folder inside this PR, where in theory generic docker build directories are living. They could perhaps be moved to the top to help emphasize keeping them multi-use; I had put them there originally cause I was having to do some hacks to get them to work inside openshift.

I am all for nuking setup.rb. I think the biggest hold back of it is the use in bats and thus the use in our CI system.

@ekohl
Copy link
Member

ekohl commented Jan 23, 2017

That sounds reasonable as a first good step to re-organize the top level (unless you think it should be part of this change only).

No, I'd prefer to get that done first and then get this merged.

The top level docker repository I don't know if anyone outside of myself even uses at this point.

That's a big problem with this repo IMHO. We have a lot of possibilities and they should be maintained. I'd like to go to a situation where each top level directory can be used independently.

There is also a docker folder inside this PR, where in theory generic docker build directories are living. They could perhaps be moved to the top to help emphasize keeping them multi-use; I had put them there originally cause I was having to do some hacks to get them to work inside openshift.

That's fine, until they are generic they should live inside openshift.

I am all for nuking setup.rb. I think the biggest hold back of it is the use in bats and thus the use in our CI system.

Agreed. Which is why I think we should get #331 merged and look at migrating the CI system.

@ehelms
Copy link
Member Author

ehelms commented Jan 23, 2017

@ekohl I hope you don't mind, since we begin to talk about more than just the Openshift aspect, I moved it to an issue (#367) with the previous points quoted.

@ekohl
Copy link
Member

ekohl commented Jan 23, 2017

Yes, let's keep this on topic.

@ehelms
Copy link
Member Author

ehelms commented Mar 26, 2017

Replaced by #424

@ehelms ehelms closed this Mar 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants