2016-12-05 15:56:14 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
sudo htpasswd -b /etc/origin/master/htpasswd dev1 dev1
|
|
|
|
sudo htpasswd -b /etc/origin/master/htpasswd test1 test1
|
|
|
|
|
|
|
|
oc login -u admin -p admin
|
|
|
|
|
|
|
|
oc new-project rubex-dev
|
|
|
|
oc policy add-role-to-user edit dev1 -n rubex-dev
|
|
|
|
oc policy add-role-to-user view test1 -n rubex-dev
|
|
|
|
|
|
|
|
oc new-project rubex-test
|
|
|
|
oc policy add-role-to-user edit test1 -n rubex-test
|
2016-12-06 20:31:58 +00:00
|
|
|
oc policy add-role-to-group system:image-puller system:serviceaccounts:rubex-test -n rubex-dev
|
2016-12-05 15:56:14 +00:00
|
|
|
|
|
|
|
oc login -u dev1 -p dev1
|
|
|
|
oc project rubex-dev
|
|
|
|
|
|
|
|
oc new-app --name frontend ruby:2.3~https://github.com/omallo/ruby-ex # then: configure GitHub webhook
|
|
|
|
oc expose service frontend
|
|
|
|
|
|
|
|
oc tag rubex-dev/frontend:latest rubex-dev/frontend:test
|
|
|
|
|
|
|
|
oc login -u test1 -p test1
|
|
|
|
oc project rubex-test
|
|
|
|
|
|
|
|
oc new-app rubex-dev/frontend:test
|
|
|
|
oc expose service frontend
|
|
|
|
|
|
|
|
oc login -u dev1 -p dev1
|
|
|
|
oc project rubex-dev
|
|
|
|
|
|
|
|
oc tag rubex-dev/frontend:latest rubex-dev/frontend:test
|
|
|
|
|
|
|
|
oc login -u admin -p admin
|
|
|
|
|
|
|
|
oc new-project cicd
|
2016-12-09 11:51:26 +00:00
|
|
|
oc policy add-role-to-user edit system:serviceaccount:cicd:jenkins -n rubex-dev
|
|
|
|
oc policy add-role-to-user edit system:serviceaccount:cicd:jenkins -n rubex-test
|
2016-12-05 15:56:14 +00:00
|
|
|
|
2017-01-02 01:02:54 +00:00
|
|
|
oc login -u system:admin
|
2016-12-29 11:07:21 +00:00
|
|
|
oc project openshift
|
2017-01-02 01:02:54 +00:00
|
|
|
oc delete is oc-jenkins
|
2016-12-29 11:07:21 +00:00
|
|
|
oc create is oc-jenkins
|
|
|
|
oc tag --source=docker --scheduled=true omallo/oc-jenkins:latest openshift/oc-jenkins:latest
|
|
|
|
|
|
|
|
#oc new-app --name=jenkins omallo/oc-jenkins
|
|
|
|
#oc expose svc ci --hostname ci.oc.habitz-app.com
|