Change 'sandbox' user to 'workshop' 05/9805/1
authorTrevor Bramwell <tbramwell@linuxfoundation.org>
Fri, 6 Apr 2018 23:13:01 +0000 (16:13 -0700)
committerTrevor Bramwell <tbramwell@linuxfoundation.org>
Fri, 6 Apr 2018 23:23:42 +0000 (16:23 -0700)
This requires rebuilding the containers and recreating the volumes.

Change-Id: I60e2edf757112024e7315a367bf4ccfe20557c54
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
README.rst
gerrit-auth.sh
init/config-ci-environment.sh
jenkins/scripts/create-jjbini.groovy
jenkins/scripts/ldap.groovy
ldap/bootstrap/groups.ldif

index c41914c..ad529aa 100644 (file)
@@ -32,7 +32,7 @@ Add the following to /etc/hosts::
   127.0.1.2 gerrit.localhost
   127.0.1.3 nexus.localhost
 
-Jenkins/Gerrit login: sandbox/sandbox
+Jenkins/Gerrit login: workshop/workshop
 Nexus login: admin/admin123
 
 Getting Started
@@ -57,7 +57,7 @@ Gerrit, and a basic job in Jenkins that verifies commits to the
 ci-management repo.
 
 Once the environment is up and running, copy your ssh public-key and add
-it to the sandbox user in Gerrit. This can be either be done through the
+it to the workshop user in Gerrit. This can be either be done through the
 web interface or from the commandline::
 
   ./gerrit-auth.sh ~/.ssh/id_rsa.pub
@@ -65,11 +65,11 @@ web interface or from the commandline::
 Then you can clone the ci-management repo and modify it to your hearts
 content::
 
-  git clone ssh://sandbox@gerrit.localhost:29418/ci-management.git
+  git clone ssh://workshop@gerrit.localhost:29418/ci-management.git
 
 Set the gitreview username::
 
-  git config --add gitreview.username "sandbox"
+  git config --add gitreview.username "workshop"
 
 And ensure the Change-Id hook exists::
 
@@ -153,7 +153,7 @@ The following is a list of automation tasks still needed before the
 environment can be considered stable:
 
 General:
-- [ ] Replace 'sandbox' names with 'workshop' since sandbox was just a
+- [x] Replace 'sandbox' names with 'workshop' since sandbox was just a
       placeholder
 - [ ] Setup OpenLDAP over SSL by default
 - [ ] Make things more configurable. There are a lot of hardcoded names
index a4ccef4..a2116b4 100755 (executable)
@@ -30,7 +30,7 @@ fi
 
 if [[ -s $KEYFILE ]]; then
     # Upload SSH Public Key
-    curl --fail -s -L -X POST -u "sandbox:sandbox" -H "Content-type:text/plain" \
+    curl --fail -s -L -X POST -u "workshop:workshop" -H "Content-type:text/plain" \
       -d "@$KEYFILE" http://gerrit.localhost/a/accounts/self/sshkeys/ > /dev/null
 
     # Provide guidance on curl errors
@@ -50,6 +50,6 @@ if [[ -s $KEYFILE ]]; then
         echo -e "\nYou can now clone the available repos:"
         print_repos $GERRIT_REPOS
         echo -e "\nWith the command:"
-        echo -e "  git clone ssh://sandbox@gerrit.localhost:29418/<repo>"
+        echo -e "  git clone ssh://workshop@gerrit.localhost:29418/<repo>"
     fi
 fi
index 272f86a..33780fc 100644 (file)
@@ -5,16 +5,16 @@
 # successfully executing.
 #
 
-GERRIT_KEY=/init/id_rsa-sandbox
+GERRIT_KEY=/init/id_rsa-workshop
 JENKINS_KEY=/jenkins/.ssh/id_rsa
 SSH_OPTIONS="-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null"
 CI_MANAGEMENT_REPO=/init/ci-management
 GLOBAL_JJB_VERSION=${GLOBAL_JJB_VERSION:-v0.6.0}
 
-# Generate a key for the sandbox user
-if [ ! -f /init/ssh-key-sandbox.done ]; then
+# Generate a key for the workshop user
+if [ ! -f /init/ssh-key-workshop.done ]; then
 ssh-keygen -t rsa -N '' -f $GERRIT_KEY
-touch /init/ssh-key-sandbox.done
+touch /init/ssh-key-workshop.done
 fi
 
 ##
@@ -37,7 +37,7 @@ fi
 
 # Be the first to login to gain Administrative rights
 if [ ! -f /init/step-1.done ]; then
-curl -X POST --data "username=sandbox&password=sandbox" http://gerrit:8080/login \
+curl -X POST --data "username=workshop&password=workshop" http://gerrit:8080/login \
     && touch /init/step-1.done
 fi
 
@@ -48,14 +48,14 @@ fi
 
 # Add generated ssh-pubkey to Gerrit keypairs
 if [ ! -f /init/step-2.done ]; then
-curl -X POST --user "sandbox:sandbox" -H "Content-type: plain/text" \
+curl -X POST --user "workshop:workshop" -H "Content-type: plain/text" \
     --data @"$GERRIT_KEY.pub" "http://gerrit:8080/a/accounts/self/sshkeys" \
     && touch /init/step-2.done
 fi
 
 # Create Jenkins ssh user in Gerrit
 if [ ! -f /init/step-3.done ]; then
-ssh $SSH_OPTIONS -p 29418 sandbox@gerrit -i $GERRIT_KEY \
+ssh $SSH_OPTIONS -p 29418 workshop@gerrit -i $GERRIT_KEY \
     gerrit create-account jenkins-workshop --full-name "Jenkins\ Workshop" \
     --group "Non-Interactive\ Users" --ssh-key - < "$JENKINS_KEY.pub" \
     && touch /init/step-3.done
@@ -63,7 +63,7 @@ fi
 
 # Create ci-management repository
 if [ ! -f /init/step-4.done ]; then
-ssh $SSH_OPTIONS -p 29418 sandbox@gerrit -i $GERRIT_KEY \
+ssh $SSH_OPTIONS -p 29418 workshop@gerrit -i $GERRIT_KEY \
     gerrit create-project ci-management --id --so --empty-commit \
     -d "Workshop\ CI-Management\ Repo" -p "All-Projects" \
     && touch /init/step-4.done
@@ -72,11 +72,11 @@ fi
 # Populate ci-management repository with global-jjb
 if [ ! -f /init/step-5.done ]; then
     ssh-keyscan -p 29418 gerrit >> /etc/ssh/ssh_known_hosts
-    git config --file ~/.gitconfig user.email "sandbox@example.org"
-    git config --file ~/.gitconfig user.name "sandbox"
+    git config --file ~/.gitconfig user.email "workshop@example.org"
+    git config --file ~/.gitconfig user.name "workshop"
     eval "$(ssh-agent)"
     ssh-add $GERRIT_KEY
-    git clone ssh://sandbox@gerrit:29418/ci-management.git $CI_MANAGEMENT_REPO
+    git clone ssh://workshop@gerrit:29418/ci-management.git $CI_MANAGEMENT_REPO
     mkdir -p $CI_MANAGEMENT_REPO/jjb
     cd $CI_MANAGEMENT_REPO/jjb
     git submodule add https://gerrit.linuxfoundation.org/infra/releng/global-jjb
@@ -96,7 +96,7 @@ if [ ! -f /init/step-6.done ]; then
 [gerrit]
 host=gerrit.localhost
 port=29418
-username=sandbox
+username=workshop
 project=ci-management.git
 defaultbranch=master
 EOF
@@ -143,8 +143,8 @@ recursive=True
 
 [jenkins]
 url=http://jenkins:8080/
-user=sandbox
-password=sandbox
+user=workshop
+password=workshop
 query_plugins_info=True
 EOF
     # Ensure JJB is installed first
@@ -162,7 +162,7 @@ if [ ! -f /init/step-8.done ]; then
 
     cd $ALL_PROJECTS
     git init
-    git remote add origin ssh://sandbox@gerrit:29418/All-Projects.git
+    git remote add origin ssh://workshop@gerrit:29418/All-Projects.git
     git fetch origin refs/meta/config:refs/remotes/origin/meta/config
     git checkout meta/config
 
index b1f8f11..fca9348 100644 (file)
@@ -27,8 +27,8 @@ recursive=True
 
 [jenkins]
 url=http://jenkins:8080/
-user=sandbox
-password=sandbox
+user=workshop
+password=workshop
 query_plugins_info=True""");
     store.save(config);
 }
index 823bc3f..0b2f121 100644 (file)
@@ -31,7 +31,7 @@ instance.setSecurityRealm(LDAPRealm)
 
 def strategy = new GlobalMatrixAuthorizationStrategy()
 
-strategy.add(Jenkins.ADMINISTER, 'sandbox-admins')
+strategy.add(Jenkins.ADMINISTER, 'workshop-admins')
 
 strategy.add(Jenkins.READ,'anonymous')
 strategy.add(Item.READ,'anonymous')
index 2e54adb..bf8b66c 100644 (file)
@@ -17,20 +17,19 @@ changetype: add
 objectClass: organizationalUnit
 ou: Groups
 
-# Password: sandbox
-dn: uid=sandbox,ou=Users,dc=example,dc=org
+dn: uid=workshop,ou=Users,dc=example,dc=org
 changetype: add
 objectClass: top
 objectClass: person
 objectClass: inetOrgPerson
-cn: Sandbox
+cn: Workshop
 sn: User
-displayname: Sandbox User
-mail: sandbox@example.org
-userpassword: {SSHA}WyQT/fg9FHJ/zcXsdvs51tk5vSlyL0fM
+displayname: Workshop User
+mail: workshop@example.org
+userpassword: {SSHA}81Znic+ah7Tzk1lODaAmi+dbVrTp1iaT
 
-dn: cn=sandbox-admins,ou=Groups,dc=example,dc=org
+dn: cn=workshop-admins,ou=Groups,dc=example,dc=org
 changetype: add
 objectClass: top
 objectClass: groupOfNames
-member: uid=sandbox,ou=Users,dc=example,dc=org
+member: uid=workshop,ou=Users,dc=example,dc=org