This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh-keygen -t rsa -b 2048 -f ~/.ssh/MyKeyPair.pem -q -P '' | |
chmod 400 ~/.ssh/MyKeyPair.pem | |
ssh-keygen -y -f ~/.ssh/MyKeyPair.pem > ~/.ssh/MyKeyPair.pub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
swagger: '2.0' #version of Swagger | |
info: # High Level information of API | |
description: Sample Swagger Demo #Give the description of API | |
version: 1.0.0 #API version | |
title: Swagger Employee Demo # API title | |
license: #Swagger license info | |
name: Apache 2.0 | |
url: 'http://www.apache.org/licenses/LICENSE-2.0.html' | |
host: localhost # Host Name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
sudo apt-get update && sudo apt-get upgrade -y | |
# jq is a sed-like tool that is specifically built to deal with JSON format. | |
sudo apt-get install jq -y | |
# install the latest version of the IBM Cloud CLI tool by issuing the command, make sure you have a minimum version of Docker 1.13.1 installed before installing this tool. | |
curl -sL http://ibm.biz/idt-installer | bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd ~/artefacts/employee/src/main/java/com/ibm/example/employee/api | |
cp HealthApiController.java HealthApiController.java.old | |
cp EmployeesApiController.java EmployeesApiController.java.old | |
sed -i "s/NOT_IMPLEMENTED/OK/" HealthApiController.java | |
sed -i "s/NOT_IMPLEMENTED/OK/" EmployeesApiController.java |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kubectl get clusterrolebinding ibm-privileged-psp-users -o yaml > privileged-psp-user.yaml | |
echo "- apiGroup: rbac.authorization.k8s.io" | sudo tee -a privileged-psp-user.yaml | |
echo " kind: Group" | sudo tee -a privileged-psp-user.yaml | |
echo " name: system:serviceaccounts:employee" | sudo tee -a privileged-psp-user.yaml | |
kubectl apply -f privileged-psp-user.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo nano /etc/docker/daemon.json | |
echo "{" | sudo tee -a /etc/docker/daemon.json | |
echo " \"insecure-registries\" : [ \"mycluster.icp:8500\" ]" | sudo tee -a /etc/docker/daemon.json | |
echo "}" | sudo tee -a /etc/docker/daemon.json | |
sudo service docker restart | |
$ docker login mycluster.icp:8500 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker tag employee mycluster.icp:8500/employee/employee:v1.0.0 | |
docker push mycluster.icp:8500/employee/employee:v1.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sed -i "s|employee|mycluster.icp:8500/employee/employee|" ~/artefacts/employee/chart/employee/values.yaml | |
sed -i "s|/health|/v1/health|" ~/artefacts/employee/chart/employee/templates/deployment.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -kLo cloudctl-linux-amd64-3.1.2-1203 https://192.168.27.100:8443/api/cli/cloudctl-linux-amd64 | |
sudo mv cloudctl-linux-amd64-3.1.2-1203 /usr/local/bin/cloudctl | |
sudo chmod +x /usr/local/bin/cloudctl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -kLo cloudctl-linux-amd64-3.1.2-1203 https://192.168.27.100:8443/api/cli/cloudctl-linux-amd64 | |
sudo mv cloudctl-linux-amd64-3.1.2-1203 /usr/local/bin/cloudctl | |
sudo chmod +x /usr/local/bin/cloudctl |