Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
thomassuedbroecker committed Nov 9, 2020
2 parents d053c2b + b54ecaf commit feadb72
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 17 deletions.
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ yarn-error.log*
*.njsproj
*.sln
*.sw*
istio-1.0.6
istio-1.1.1
istio-1.1.5
istio-1.*
deploy-kiali-to-kubernetes.sh
install-minikube-mac.sh
open-monitoring*.log
Expand Down
2 changes: 1 addition & 1 deletion articles-java-jee/deployment/IKS-kubernetes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ spec:
spec:
containers:
- name: articles
image: us.icr.io/cloud-native-b11w32mgrt/articles:1
image: us.icr.io/cloud-native-xsfutcd3w9/articles:1
ports:
- containerPort: 8080
env:
Expand Down
4 changes: 3 additions & 1 deletion documentation/IKSDeployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,9 @@ When Istio is installed and all Istio pods are started, create a namespace in th
$ iks-scripts/create-registry.sh
```
The container images we will build next are stored in the Container Registry as `us.icr.io/cloud-native/<imagename>:<tag>` if you didn't change the defaults.
This will create a unique namespace similar to `cloud-native-xxxxxxxxxx` in the Dallas region (us.icr.io):
The container images we will build next are stored in the Container Registry as `us.icr.io/cloud-native-xxxxxxxxxx/<imagename>:<tag>`.
### Initial Deployment of Cloud Native Starter
Expand Down
2 changes: 1 addition & 1 deletion iks-scripts/create-iks-cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function create_cluster() {
ibmcloud api https://cloud.ibm.com >> $LOG_FILE 2>&1
ibmcloud login --apikey $IBMCLOUD_API_KEY -r $IBM_CLOUD_REGION >> $LOG_FILE 2>&1
_out Creating cluster
ibmcloud ks cluster create --name $CLUSTER_NAME >> $LOG_FILE 2>&1
ibmcloud ks cluster create classic --name $CLUSTER_NAME >> $LOG_FILE 2>&1
# check if something went wrong
if [ $? == 0 ]; then
_out -- Creating a cluster will take some time, please wait at least 20 minutes before
Expand Down
5 changes: 3 additions & 2 deletions iks-scripts/deploy-articles-java-jee.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ function setup() {
fi
unzip -o liberty-opentracing-zipkintracer-1.3-sample.zip -d liberty-opentracing-zipkintracer/

# docker build replacement for ICR
ibmcloud cr build -f Dockerfile.nojava --tag $REGISTRY/$REGISTRY_NAMESPACE/articles:1 .
# docker build for ICR
docker build -f Dockerfile.nojava --tag $REGISTRY/$REGISTRY_NAMESPACE/articles:1 .
docker push $REGISTRY/$REGISTRY_NAMESPACE/articles:1

# Add ICR tags to K8s deployment.yaml
sed "s+articles:1+$REGISTRY/$REGISTRY_NAMESPACE/articles:1+g" deployment/kubernetes.yaml > deployment/IKS-kubernetes.yaml
Expand Down
5 changes: 3 additions & 2 deletions iks-scripts/deploy-authors-nodejs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,9 @@ function setup() {

_out Build Docker Image
cd ${root_folder}/authors-nodejs
# docker build replacement for ICR
ibmcloud cr build -f Dockerfile --tag $REGISTRY/$REGISTRY_NAMESPACE/authors:1 .
# docker build for ICR
docker build -f Dockerfile --tag $REGISTRY/$REGISTRY_NAMESPACE/authors:1 .
docker push $REGISTRY/$REGISTRY_NAMESPACE/authors:1

_out Deploy to IKS
cd ${root_folder}/authors-nodejs/deployment
Expand Down
6 changes: 4 additions & 2 deletions iks-scripts/deploy-web-api-java-jee-v2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,10 @@ function setup() {
rm src/main/java/com/ibm/webapi/business/Service.java
mv src/main/java/com/ibm/webapi/business/Service2.java src/main/java/com/ibm/webapi/business/Service.java

# docker build replacement for ICR
ibmcloud cr build -f Dockerfile.nojava --tag $REGISTRY/$REGISTRY_NAMESPACE/web-api:2 .
# docker build for ICR
docker build -f Dockerfile.nojava --tag $REGISTRY/$REGISTRY_NAMESPACE/web-api:2 .
docker push $REGISTRY/$REGISTRY_NAMESPACE/web-api:2


kubectl delete -f deployment/istio-service-v1.yaml --ignore-not-found

Expand Down
5 changes: 3 additions & 2 deletions iks-scripts/deploy-web-api-java-jee.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ function setup() {
rm src/main/java/com/ibm/webapi/business/Service.java
mv src/main/java/com/ibm/webapi/business/Service2.java src/main/java/com/ibm/webapi/business/Service.java

# docker build replacement for ICR
ibmcloud cr build -f Dockerfile.nojava --tag $REGISTRY/$REGISTRY_NAMESPACE/web-api:1 .
# docker build for ICR
docker build -f Dockerfile.nojava --tag $REGISTRY/$REGISTRY_NAMESPACE/web-api:1 .
docker push $REGISTRY/$REGISTRY_NAMESPACE/web-api:1

kubectl apply -f deployment/kubernetes-service.yaml

Expand Down
7 changes: 4 additions & 3 deletions iks-scripts/deploy-web-app-vuejs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,10 @@ function setup() {

configureVUEminikubeIP

# docker build replacement for ICR
ibmcloud cr build -f Dockerfile --tag $REGISTRY/$REGISTRY_NAMESPACE/web-app:1 .

# docker build for ICR
docker build -f Dockerfile --tag $REGISTRY/$REGISTRY_NAMESPACE/web-app:1 .
docker push $REGISTRY/$REGISTRY_NAMESPACE/web-app:1

# Add ICR tags to K8s deployment.yaml
sed "s+web-app:1+$REGISTRY/$REGISTRY_NAMESPACE/web-app:1+g" deployment/kubernetes.yaml > deployment/IKS-kubernetes.yaml
kubectl apply -f deployment/IKS-kubernetes.yaml
Expand Down

0 comments on commit feadb72

Please sign in to comment.