- Navigate to Web-CAT/WEB-Cat/Docker/
- Open config/configuration.properties and set the following fields: 'dbConnectPasswordGLOBAL' , 'coreAdminEmail' , 'dbConnectUserGLOBAL' , 'AdminUsername'
- Replace placeholders in
Web-CAT/kubernetes-yaml's/mysql/secrets.yaml
andWeb-CAT/kubernetes-yaml's/Web-CAT/postfix-secret.yaml
with base64 encoded values.
- git clone https://github.com/KristianZH/Web-CAT.git
- navigate to WEB-CAT-Grader/kubernetes-yaml's/mysql
- kubectl create -f storageclass.yaml (once per cluster)
- kubectl create -f secrets.yaml (once per cluster)
- kubectl create -f mysql-config.yaml
- kubectl create -f mysql-services.yaml
- kubectl create -f statefulset.yaml
- navigate to Web-CAT/mysql-init
- kubectl cp init.sql mysql-0:/
- kubectl exec -it mysql-0 -- bash
- mysql -u <-username-> -p<-password-> <-dbname-> < "init.sql"; exit; exit;
- navigate to WEB-CAT-Grader/kubernetes-yaml's/Web-CAT
- kubectl create -f postfix-secret.yaml
- kubectl create -f data-pvc.yaml
- kubectl create -f webcat-node.yaml
- kubectl create -f service.yaml
- copy webcat pod's name from : kubectl get po
- kubectl exec -it <-pod's name-> -- bash
- cp -r /plugins/BatchPlugin /usr/web-cat-storage/ (once per cluster)
- cp -r /plugins/JavaTddPlugin /usr/web-cat-storage/UserScripts/FMI/stoyo/ (once per cluster)
- install docker
- eval "$(docker-machine env <-docker-machine-name->)"
- docker login -u <-dockerhubName-> -p <-dockerhubPassword->
- navigate to WEB-CAT-Grader/WEB-Cat/Docker
- docker build -t webcat:v2 .
- docker tag webcat:v2 <-dockerhubName->/webcat:v<-container-version->
- docker push <-dockerhubName->/webcat:v<-container-version->
- kubectl set image deployments/webcat-node webcat-node=<-dockerhubName->/webcat:v<-container-version->
- create jar file with name "leaderboard.jar"
- paste it in Web-CAT/WEB-Cat/Docker/leaderboard/
- kubectl scale deployments/webcat-node --replicas=1
- kubectl exec -it to webcat's pod and delete '/usr/web-cat-storage/FMI/' and everything inside '/usr/web-cat-storage/_Repositories'
- kubectl cp init.sql file in mysql-0
- kubectl exec -it mysql-0 -- bash;
- navigate to init.sql and run mysql -u <-username-> -p <-dbname-> < "init.sql"
- kubectl scale deployments/webcat-node --replicas=3
- kubectl delete statefulset mysql
- kubectl delete configmap,service,pvc -l app=mysql
- kubectl delete secret database-secret-config
- kubectl delete storageclass gp2
- kubectl delete deploy webcat-node
- kubectl delete service webcat-node
- kubectl delete pvc webcat-pvc