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 to openshift online? #1

Open
kachkaev opened this issue May 16, 2017 · 2 comments
Open

Deploying to openshift online? #1

kachkaev opened this issue May 16, 2017 · 2 comments

Comments

@kachkaev
Copy link

Hi Oleksii and thanks for sharing your template!

I'm just starting with openshift and have decided to try and online version. The first thing I've decided to check is if it's possible to use the free tier as an external runner for my self-hosted gitlab instance. Just mechanically repeated all your nicely written steps but got this in the end:

screenshot from 2017-05-16 17-13-12

I suspect that the reason is that these commands did not run properly:

oc login -u system:admin
oc adm policy add-scc-to-user anyuid -z sa-gitlab-runner -n prj-gitlab-runner
oc adm policy add-scc-to-user anyuid -z sa-minio -n prj-gitlab-runner

(got Error from server (Forbidden): User "ABC" cannot get securitycontextconstraints at the cluster scope from OC)

Do you know if your template can be theoretically deployed to OpenShift online? Just curious what you think. I also believe that others like may stumble across your repo like me, so this issue can help them too.

@oprudkyi
Copy link
Owner

Hi,

theoretically sa-gitlab-runner service account can be run with builder/deployer permissions (that can be set in OpenShift Online) , though I really don't understand why it tries to create /var/lib/docker/volumes , i.e. gitlab runner there should just connect to kubernetes api and remotely manage tests.

as alternative (possible inconvenient) - it can be run locally but create testing containers (i.e. where actual test is run) via kubernetes API on the OpenShift Online
https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/blob/master/docs/executors/kubernetes.md

@kachkaev
Copy link
Author

kachkaev commented May 16, 2017

Thanks for your reply @oprudkyi! Yeah, that idea with the remote kubernetes runner orchestration might have a chance to work too.

A funny thing is that right after I sent a comment to you I noticed a very relevant new blog post on gitlab: https://about.gitlab.com/2017/05/16/devops-containers-gitlab-openshift/

The video features a template similar to yours, so you might find it interesting. Hard to find it anywhere yet though; the source is here: https://gitlab.com/gitlab-org/omnibus-gitlab/blob/f04b5c4443b3a98011577cdd7c9de766a287531e/docker/openshift/runner-template.yml

Their template does not work on OpenShift online too due to not being able to start a pod in a privileged mode.

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

No branches or pull requests

2 participants