summaryrefslogtreecommitdiffstats
path: root/samples
diff options
context:
space:
mode:
authorMuhammad Shaikh (Salman) <muhammad.shaikh@huawei.com>2018-05-30 00:41:19 +0000
committerMuhammad Shaikh (Salman) <muhammad.shaikh@huawei.com>2018-05-30 00:55:03 +0000
commita9a792e18c5c985874440781ca2cb5c23105d54a (patch)
tree36c4103a194cb25783b435cc486b82e1fcbee396 /samples
parenta611041d138a71a87c12d4734e5d1a780852ecc9 (diff)
Adding clearwater IMS yaml and clearwater live test dockerfile to test istio service-mesh
Checking into CLEARWATER_ISTIO branch This part of the project is intended to validate the clearwater IMS with istio service-mesh. Change-Id: Ia5ba86301a363fcf9cfe0bac525606b0d897713e Signed-off-by: Muhammad Shaikh (Salman) <muhammad.shaikh@huawei.com>
Diffstat (limited to 'samples')
-rw-r--r--samples/scenarios/clearwater_ims/clt-docker/Dockerfile22
-rw-r--r--samples/scenarios/clearwater_ims/clt-docker/clearwater-live-test.tgzbin0 -> 1627952 bytes
-rwxr-xr-xsamples/scenarios/clearwater_ims/scripts/prov-numbers.sh1
-rwxr-xr-xsamples/scenarios/clearwater_ims/scripts/run-live-test.sh40
-rw-r--r--samples/scenarios/clearwater_ims/yaml/ellis-depl.yaml40
-rw-r--r--samples/scenarios/clearwater_ims/yaml/ellis-svc.yaml16
-rw-r--r--samples/scenarios/clearwater_ims/yaml/homer-depl.yaml38
-rw-r--r--samples/scenarios/clearwater_ims/yaml/homer-svc.yaml14
-rw-r--r--samples/scenarios/clearwater_ims/yaml/homestead-depl.yaml54
-rw-r--r--samples/scenarios/clearwater_ims/yaml/homestead-prov-depl.yaml42
-rw-r--r--samples/scenarios/clearwater_ims/yaml/homestead-prov-svc.yaml14
-rw-r--r--samples/scenarios/clearwater_ims/yaml/homestead-svc.yaml14
-rw-r--r--samples/scenarios/clearwater_ims/yaml/ralf-depl.yaml54
-rw-r--r--samples/scenarios/clearwater_ims/yaml/ralf-svc.yaml14
14 files changed, 363 insertions, 0 deletions
diff --git a/samples/scenarios/clearwater_ims/clt-docker/Dockerfile b/samples/scenarios/clearwater_ims/clt-docker/Dockerfile
new file mode 100644
index 0000000..1047521
--- /dev/null
+++ b/samples/scenarios/clearwater_ims/clt-docker/Dockerfile
@@ -0,0 +1,22 @@
+From ubuntu:16.04
+MAINTAINER Salman Shaikh (muhammad.shaikh@huawei.com)
+RUN apt-get update && apt-get -y upgrade
+RUN apt-get install -y build-essential bundler git
+RUN apt-get install -y curl
+#RUN apt-get remove -y ruby
+RUN gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
+RUN curl -L https://get.rvm.io | bash -s stable
+#RUN /bin/bash -c "source /usr/local/rvm/scripts/rvm"
+RUN /bin/bash -c "source /etc/profile.d/rvm.sh \
+ && rvm autolibs enable \
+ && rvm install 1.9.3 \
+ && rvm use 1.9.3"
+#RUN mkdir -p /root/.ssh
+#ADD id_rsa /root/.ssh/id_rsa
+#RUN chmod 700 /root/.ssh/id_rsa
+ADD clearwater-live-test.tgz /opt/
+RUN /bin/bash -c "source /etc/profile.d/rvm.sh \
+ && cd /opt/clearwater-live-test \
+ && bundle install"
+SHELL ["/bin/bash", "-c", "source /etc/profile.d/rvm.sh"]
+#CMD /bin/bash -c "source /etc/profile.d/rvm.sh"
diff --git a/samples/scenarios/clearwater_ims/clt-docker/clearwater-live-test.tgz b/samples/scenarios/clearwater_ims/clt-docker/clearwater-live-test.tgz
new file mode 100644
index 0000000..9bcb417
--- /dev/null
+++ b/samples/scenarios/clearwater_ims/clt-docker/clearwater-live-test.tgz
Binary files differ
diff --git a/samples/scenarios/clearwater_ims/scripts/prov-numbers.sh b/samples/scenarios/clearwater_ims/scripts/prov-numbers.sh
new file mode 100755
index 0000000..a73527a
--- /dev/null
+++ b/samples/scenarios/clearwater_ims/scripts/prov-numbers.sh
@@ -0,0 +1 @@
+kubectl exec -it $(kubectl get pods -l=service=ellis -o jsonpath='{.items[0].metadata.name}') -c ellis -- bash -c "sudo bash -c \"export PATH=/usr/share/clearwater/ellis/env/bin:$PATH ; cd /usr/share/clearwater/ellis/src/metaswitch/ellis/tools/ ; python create_numbers.py --start 6505550000 --count 10\""
diff --git a/samples/scenarios/clearwater_ims/scripts/run-live-test.sh b/samples/scenarios/clearwater_ims/scripts/run-live-test.sh
new file mode 100755
index 0000000..6fb0a50
--- /dev/null
+++ b/samples/scenarios/clearwater_ims/scripts/run-live-test.sh
@@ -0,0 +1,40 @@
+#!/bin/bash
+
+TITLE="System Information for $HOSTNAME"
+RIGHT_NOW=$(date +"%x %r %Z")
+TIME_STAMP="Updated on $RIGHT_NOW by $USER"
+
+BONO_SIP_PROXY_IP=$1
+ELLIS_IP=$2
+BASIC=$3
+
+para1=0
+para2=0
+if [[ -n "$BONO_SIP_PROXY_IP" ]];then
+ para1=1
+else
+ echo "ERROR: Missing External Loadbalancer IP for Bono"
+fi
+if [[ -n "$ELLIS_IP" ]];then
+ para2=1
+else
+ echo "ERROR: Missing External Loadbalancer IP for Ellis"
+fi
+
+if [ "$para1" -eq "0" ];then
+ echo "";echo "USAGE: $0 <BONO_SIP_PROXY_IP> <ELLIS_IP>";echo ""
+ exit
+fi
+if [ "$para2" -eq "0" ];then
+ echo "";echo "USAGE: $0 <BONO_SIP_PROXY_IP> <ELLIS_IP>";echo ""
+ exit
+fi
+
+
+if [[ $para1 == 1 && $para2 == 1 ]];then
+ if [ "$BASIC" == "basic" ];then
+ docker exec -it live-test bash -c "source /etc/profile.d/rvm.sh && cd /opt/clearwater-live-test && rake test[default.svc.cluster.local] PROXY=$BONO_SIP_PROXY_IP ELLIS=$ELLIS_IP SIGNUP_CODE=\"secret\" TESTS=\"Basic Call - Mainline\""
+ else
+ docker exec -it live-test bash -c "source /etc/profile.d/rvm.sh && cd /opt/clearwater-live-test && rake test[default.svc.cluster.local] PROXY=$BONO_SIP_PROXY_IP ELLIS=$ELLIS_IP SIGNUP_CODE=\"secret\""
+ fi
+fi
diff --git a/samples/scenarios/clearwater_ims/yaml/ellis-depl.yaml b/samples/scenarios/clearwater_ims/yaml/ellis-depl.yaml
new file mode 100644
index 0000000..7cbaf1d
--- /dev/null
+++ b/samples/scenarios/clearwater_ims/yaml/ellis-depl.yaml
@@ -0,0 +1,40 @@
+apiVersion: extensions/v1beta1
+kind: Deployment
+metadata:
+ name: ellis
+ labels:
+ app: ellis
+spec:
+ replicas: 1
+ template:
+ metadata:
+ labels:
+ app: ellis
+ service: ellis
+ spec:
+ containers:
+ #- image: "localhost:5000/ellis:clearwater/base:latest"
+ - image: "instance-1:5000/clearwater/ellis:latest"
+ imagePullPolicy: Always
+ name: ellis
+ ports:
+ - containerPort: 22
+ - containerPort: 80
+ envFrom:
+ - configMapRef:
+ name: env-vars
+ env:
+ - name: MY_POD_IP
+ valueFrom:
+ fieldRef:
+ fieldPath: status.podIP
+ - name: PUBLIC_IP
+ value: <External Load Balancer IP>
+ livenessProbe:
+ tcpSocket:
+ port: 80
+ initialDelaySeconds: 30
+ readinessProbe:
+ tcpSocket:
+ port: 80
+ restartPolicy: Always
diff --git a/samples/scenarios/clearwater_ims/yaml/ellis-svc.yaml b/samples/scenarios/clearwater_ims/yaml/ellis-svc.yaml
new file mode 100644
index 0000000..da65bd0
--- /dev/null
+++ b/samples/scenarios/clearwater_ims/yaml/ellis-svc.yaml
@@ -0,0 +1,16 @@
+apiVersion: v1
+kind: Service
+metadata:
+ name: ellis
+ labels:
+ app: ellis
+spec:
+ #clusterIP: None
+ type: "LoadBalancer"
+ loadBalancerIP: <External Load Balancer IP>
+ ports:
+ - name: "http"
+ port: 80
+ selector:
+ app: ellis
+ service: ellis
diff --git a/samples/scenarios/clearwater_ims/yaml/homer-depl.yaml b/samples/scenarios/clearwater_ims/yaml/homer-depl.yaml
new file mode 100644
index 0000000..d753241
--- /dev/null
+++ b/samples/scenarios/clearwater_ims/yaml/homer-depl.yaml
@@ -0,0 +1,38 @@
+apiVersion: extensions/v1beta1
+kind: Deployment
+metadata:
+ name: homer
+ labels:
+ app: homer
+spec:
+ replicas: 1
+ template:
+ metadata:
+ labels:
+ app: homer
+ service: homer
+ spec:
+ containers:
+ #- image: "localhost:5000/homer:clearwater/base:latest"
+ - image: "instance-1:5000/clearwater/homer:latest"
+ imagePullPolicy: Always
+ name: homer
+ ports:
+ - containerPort: 22
+ - containerPort: 7888
+ envFrom:
+ - configMapRef:
+ name: env-vars
+ env:
+ - name: MY_POD_IP
+ valueFrom:
+ fieldRef:
+ fieldPath: status.podIP
+ livenessProbe:
+ tcpSocket:
+ port: 7888
+ initialDelaySeconds: 30
+ readinessProbe:
+ tcpSocket:
+ port: 7888
+ restartPolicy: Always
diff --git a/samples/scenarios/clearwater_ims/yaml/homer-svc.yaml b/samples/scenarios/clearwater_ims/yaml/homer-svc.yaml
new file mode 100644
index 0000000..4329843
--- /dev/null
+++ b/samples/scenarios/clearwater_ims/yaml/homer-svc.yaml
@@ -0,0 +1,14 @@
+apiVersion: v1
+kind: Service
+metadata:
+ name: homer
+ labels:
+ app: homer
+spec:
+ ports:
+ - name: "7888"
+ port: 7888
+ selector:
+ app: homer
+ service: homer
+ clusterIP: None
diff --git a/samples/scenarios/clearwater_ims/yaml/homestead-depl.yaml b/samples/scenarios/clearwater_ims/yaml/homestead-depl.yaml
new file mode 100644
index 0000000..c30bac0
--- /dev/null
+++ b/samples/scenarios/clearwater_ims/yaml/homestead-depl.yaml
@@ -0,0 +1,54 @@
+apiVersion: extensions/v1beta1
+kind: Deployment
+metadata:
+ name: homestead
+ labels:
+ app: homestead
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ service: homestead
+ template:
+ metadata:
+ labels:
+ app: homestead
+ service: homestead
+ snmp: enabled
+ spec:
+ containers:
+ #- image: "localhost:5000/homestead:clearwater/base:latest"
+ - image: "instance-1:5000/clearwater/homestead:latest"
+ imagePullPolicy: Always
+ name: homestead
+ ports:
+ - containerPort: 22
+ - containerPort: 8888
+ envFrom:
+ - configMapRef:
+ name: env-vars
+ env:
+ - name: MY_POD_IP
+ valueFrom:
+ fieldRef:
+ fieldPath: status.podIP
+ livenessProbe:
+ exec:
+ command: ["/bin/bash", "/usr/share/kubernetes/liveness.sh", "8888"]
+ initialDelaySeconds: 60
+ readinessProbe:
+ exec:
+ command: ["/bin/bash", "/usr/share/kubernetes/liveness.sh", "8888"]
+ volumeMounts:
+ - name: homesteadlogs
+ mountPath: /var/log/homestead
+ - image: busybox
+ name: tailer
+ command: [ "tail", "-F", "/var/log/homestead/homestead_current.txt" ]
+ volumeMounts:
+ - name: homesteadlogs
+ mountPath: /var/log/homestead
+ volumes:
+ - name: homesteadlogs
+ emptyDir: {}
+ restartPolicy: Always
diff --git a/samples/scenarios/clearwater_ims/yaml/homestead-prov-depl.yaml b/samples/scenarios/clearwater_ims/yaml/homestead-prov-depl.yaml
new file mode 100644
index 0000000..18b47ea
--- /dev/null
+++ b/samples/scenarios/clearwater_ims/yaml/homestead-prov-depl.yaml
@@ -0,0 +1,42 @@
+apiVersion: extensions/v1beta1
+kind: Deployment
+metadata:
+ name: homestead-prov
+ labels:
+ app: homestead-prov
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ service: homestead-prov
+ template:
+ metadata:
+ labels:
+ app: homestead-prov
+ service: homestead-prov
+ snmp: enabled
+ spec:
+ containers:
+ #- image: "localhost:5000/homestead-prov:clearwater/base:latest"
+ - image: "instance-1:5000/clearwater/homestead-prov:latest"
+ imagePullPolicy: Always
+ name: homestead-prov
+ ports:
+ - containerPort: 22
+ - containerPort: 8889
+ envFrom:
+ - configMapRef:
+ name: env-vars
+ env:
+ - name: MY_POD_IP
+ valueFrom:
+ fieldRef:
+ fieldPath: status.podIP
+ livenessProbe:
+ exec:
+ command: ["/bin/bash", "/usr/share/clearwater/bin/poll_homestead-prov.sh"]
+ initialDelaySeconds: 60
+ readinessProbe:
+ exec:
+ command: ["/bin/bash", "/usr/share/clearwater/bin/poll_homestead-prov.sh"]
+ restartPolicy: Always
diff --git a/samples/scenarios/clearwater_ims/yaml/homestead-prov-svc.yaml b/samples/scenarios/clearwater_ims/yaml/homestead-prov-svc.yaml
new file mode 100644
index 0000000..66b6358
--- /dev/null
+++ b/samples/scenarios/clearwater_ims/yaml/homestead-prov-svc.yaml
@@ -0,0 +1,14 @@
+apiVersion: v1
+kind: Service
+metadata:
+ name: homestead-prov
+ labels:
+ app: homestead-prov
+spec:
+ ports:
+ - name: "8889"
+ port: 8889
+ selector:
+ app: homestead-prov
+ service: homestead-prov
+ clusterIP: None
diff --git a/samples/scenarios/clearwater_ims/yaml/homestead-svc.yaml b/samples/scenarios/clearwater_ims/yaml/homestead-svc.yaml
new file mode 100644
index 0000000..99c1942
--- /dev/null
+++ b/samples/scenarios/clearwater_ims/yaml/homestead-svc.yaml
@@ -0,0 +1,14 @@
+apiVersion: v1
+kind: Service
+metadata:
+ name: homestead
+ labels:
+ app: homestead
+spec:
+ ports:
+ - name: "8888"
+ port: 8888
+ selector:
+ app: homestead
+ service: homestead
+ clusterIP: None
diff --git a/samples/scenarios/clearwater_ims/yaml/ralf-depl.yaml b/samples/scenarios/clearwater_ims/yaml/ralf-depl.yaml
new file mode 100644
index 0000000..da6df5f
--- /dev/null
+++ b/samples/scenarios/clearwater_ims/yaml/ralf-depl.yaml
@@ -0,0 +1,54 @@
+apiVersion: extensions/v1beta1
+kind: Deployment
+metadata:
+ name: ralf
+ labels:
+ app: ralf
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ service: ralf
+ template:
+ metadata:
+ labels:
+ app: ralf
+ service: ralf
+ snmp: enabled
+ spec:
+ containers:
+ #- image: "localhost:5000/ralf:clearwater/base:latest"
+ - image: "instance-1:5000/clearwater/ralf:latest"
+ imagePullPolicy: Always
+ name: ralf
+ ports:
+ - containerPort: 22
+ - containerPort: 10888
+ envFrom:
+ - configMapRef:
+ name: env-vars
+ env:
+ - name: MY_POD_IP
+ valueFrom:
+ fieldRef:
+ fieldPath: status.podIP
+ livenessProbe:
+ tcpSocket:
+ port: 10888
+ initialDelaySeconds: 30
+ readinessProbe:
+ tcpSocket:
+ port: 10888
+ volumeMounts:
+ - name: ralflogs
+ mountPath: /var/log/ralf
+ - image: busybox
+ name: tailer
+ command: [ "tail", "-F", "/var/log/ralf/ralf_current.txt" ]
+ volumeMounts:
+ - name: ralflogs
+ mountPath: /var/log/ralf
+ volumes:
+ - name: ralflogs
+ emptyDir: {}
+ restartPolicy: Always
diff --git a/samples/scenarios/clearwater_ims/yaml/ralf-svc.yaml b/samples/scenarios/clearwater_ims/yaml/ralf-svc.yaml
new file mode 100644
index 0000000..2e72ac0
--- /dev/null
+++ b/samples/scenarios/clearwater_ims/yaml/ralf-svc.yaml
@@ -0,0 +1,14 @@
+apiVersion: v1
+kind: Service
+metadata:
+ name: ralf
+ labels:
+ app: ralf
+spec:
+ ports:
+ - name: "10888"
+ port: 10888
+ selector:
+ app: ralf
+ service: ralf
+ clusterIP: None