Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bookinfo - Namespace onboarding #17

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions ec2/terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ resource "aws_instance" "ubuntu-ec2" {
provisioner "remote-exec" {
inline = [
"cd /tmp/examples",
"git checkout ec2",
"git checkout bookinfo",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we doing a git checkout of bookinfo (or ec2)? Presumably once this merges to master we'd use the code on the master branch (not on the bookinfo... or ec2... branch)? Should this just use the code from whatever branch it is on?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's because I need to test the changes before they go to master. If I would just checkout master branch I wouldn't be able to see the modifications to bookinfo. This is the same problem I had with devops-510: I needed to checkout that branch to really test the changes.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see... because you're using ec2 to test the bookinfo changes and its doing its own clone you need it to grab this branch. Ok, please be sure to do another commit after this to remove the checkout of the bookinfo branch.

"chmod +x /tmp/examples/ec2/install_dependencies.sh",
"cd /tmp/examples/ec2; ./install_dependencies.sh",
"sudo usermod -aG docker $USER",
Expand All @@ -67,7 +67,7 @@ resource "aws_instance" "ubuntu-ec2" {
provisioner "remote-exec" {
inline = [
"cd /tmp/examples",
"git checkout ec2",
"git checkout bookinfo",
"chmod +x /tmp/examples/kind/kind.sh",
"cd /tmp/examples/kind; ./kind.sh",
]
Expand All @@ -76,7 +76,7 @@ resource "aws_instance" "ubuntu-ec2" {
provisioner "remote-exec" {
inline = [
"cd /tmp/examples",
"git checkout ec2",
"git checkout bookinfo",
"chmod +x /tmp/examples/kind/bookinfo/bookinfo.sh",
"cd /tmp/examples/kind/bookinfo; ./bookinfo.sh",
]
Expand Down
2 changes: 0 additions & 2 deletions kind/bookinfo/config_files/details.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: details-v1
annotations:
avesha.io/slice: convoy
labels:
app: details
version: v1
Expand Down
2 changes: 0 additions & 2 deletions kind/bookinfo/config_files/productpage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: productpage-v1
annotations:
avesha.io/slice: convoy
labels:
app: productpage
version: v1
Expand Down
2 changes: 0 additions & 2 deletions kind/bookinfo/config_files/ratings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: ratings-v1
annotations:
avesha.io/slice: convoy
labels:
app: ratings
version: v1
Expand Down
2 changes: 0 additions & 2 deletions kind/bookinfo/config_files/reviews.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: reviews-v3
annotations:
avesha.io/slice: convoy
labels:
app: reviews
version: v3
Expand Down
8 changes: 4 additions & 4 deletions kind/bookinfo/config_files/serviceexports.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
##################################################################################
# Details ServiceExport
##################################################################################
apiVersion: networking.kubeslice.io/v1beta1
apiVersion: mesh.avesha.io/v1beta1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this changed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good observation. I copied this config file from the latest version of the internal doc and didn't notice this change.

kind: ServiceExport
metadata:
name: details
Expand All @@ -10,7 +10,7 @@ spec:
selector:
matchLabels:
app: details
ingressEnabled: false
ingressEnabled: false
ports:
- name: http
containerPort: 9080
Expand All @@ -19,7 +19,7 @@ spec:
##################################################################################
# Reviews ServiceExport
##################################################################################
apiVersion: networking.kubeslice.io/v1beta1
apiVersion: mesh.avesha.io/v1beta1
kind: ServiceExport
metadata:
name: reviews
Expand All @@ -28,7 +28,7 @@ spec:
selector:
matchLabels:
app: reviews
ingressEnabled: false
ingressEnabled: false
ports:
- name: http
containerPort: 9080
Expand Down
1 change: 1 addition & 0 deletions kind/kind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ for WORKER in ${WORKERS[@]}; do
sleep 60
kubectl get pods -n kubeslice-system
kubectl create ns iperf
kubectl create ns bookinfo
done

sleep 60
Expand Down
3 changes: 3 additions & 0 deletions kind/slice.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ spec:
- namespace: iperf
clusters:
- '*'
- namespace: bookinfo
clusters:
- '*'
isolationEnabled: false #make this true in case you want to enable isolation
allowedNamespaces:
- namespace: kube-system
Expand Down