summaryrefslogtreecommitdiffstats
path: root/adapters/mso-openstack-adapters/Deployment
diff options
context:
space:
mode:
Diffstat (limited to 'adapters/mso-openstack-adapters/Deployment')
-rw-r--r--adapters/mso-openstack-adapters/Deployment/Dockerfile.adapters40
-rw-r--r--adapters/mso-openstack-adapters/Deployment/pod_rc.yaml21
-rw-r--r--adapters/mso-openstack-adapters/Deployment/pod_svc.yaml14
3 files changed, 75 insertions, 0 deletions
diff --git a/adapters/mso-openstack-adapters/Deployment/Dockerfile.adapters b/adapters/mso-openstack-adapters/Deployment/Dockerfile.adapters
new file mode 100644
index 0000000000..4d3e36ed9c
--- /dev/null
+++ b/adapters/mso-openstack-adapters/Deployment/Dockerfile.adapters
@@ -0,0 +1,40 @@
+FROM openjdk:8-jdk-alpine
+MAINTAINER mc4615@att.com
+EXPOSE 8080
+ENV APP_HOME /home/$USER_NAME/app
+RUN mkdir $APP_HOME
+ADD mso-openstack-adapters-1.1.0-SNAPSHOT.jar $APP_HOME/mso-openstack-adapters-1.1.0-SNAPSHOT.jar
+WORKDIR $APP_HOME
+RUN touch mso-openstack-adapters-1.1.0-SNAPSHOT.jar
+ENTRYPOINT ["java","-jar","-Dspring.profiles.active=dev","mso-openstack-adapters-1.1.0-SNAPSHOT.jar"]
+
+
+
+
+
+
+######### README #########
+# NOTES ########
+# cd /Users/mercychan/git/mso-e/adapters/mso-openstack-adapters/Deployment/
+# docker build -f Dockerfile.adapters -t mercechan/msoadapters .
+# docker run -it -p 8080:8080 --name mchan mercechan/msoadapters # interactive mode
+# docker run -d -p 8080:8080 --name mchan mercechan/msoadapters # daemon mode
+# docker exec -it mchan /bin/bash # this will get you in docker container
+# NOTES ########
+
+
+# COMMANDS ########
+# 1. CREATE MSO_NETWORK TO HOST CONTAINER
+# docker network ls # show list of existing networks
+# docker network create --driver bridge mso_network
+# docker network inspect mso_network # this will list details of the named network
+# docker network rm mso_network # remove mso_network docker network, optional
+# docker logs mchan # to show log info for mchan container
+
+# 2. CREATE CONTAINER AND PUT IT IN THE MSO_NETWORK
+# FOR DAEMON MODE USE -d
+# docker run -d --net=mso_network -p 8080:8080 --name mchan mercechan/msoadapters
+# OR for interactive mode (-it), run the following command
+# docker run -it --net=mso_network -p 8080:8080 --name mchan mercechan/msoadapters
+# COMMANDS ########
+######### README ######### \ No newline at end of file
diff --git a/adapters/mso-openstack-adapters/Deployment/pod_rc.yaml b/adapters/mso-openstack-adapters/Deployment/pod_rc.yaml
new file mode 100644
index 0000000000..4cc95c6762
--- /dev/null
+++ b/adapters/mso-openstack-adapters/Deployment/pod_rc.yaml
@@ -0,0 +1,21 @@
+apiVersion: v1
+kind: ReplicationController
+metadata:
+ name: msoreplicationcontroller
+spec:
+ replicas: 1
+ selector:
+ app: mchanmsopod
+ template:
+ metadata:
+ labels:
+ app: mchanmsopod
+ spec:
+ containers:
+ - name: mchancontainer
+ image: mercechan/msoadapters:kube
+ command: ["java"]
+ args: ["-jar","-Dspring.profiles.active=dev","mso-openstack-adapters-1.1.0-SNAPSHOT.jar"]
+ ports:
+ - containerPort: 8080
+ restartPolicy: Always \ No newline at end of file
diff --git a/adapters/mso-openstack-adapters/Deployment/pod_svc.yaml b/adapters/mso-openstack-adapters/Deployment/pod_svc.yaml
new file mode 100644
index 0000000000..8f262078a1
--- /dev/null
+++ b/adapters/mso-openstack-adapters/Deployment/pod_svc.yaml
@@ -0,0 +1,14 @@
+apiVersion: v1
+kind: Service
+metadata:
+ name: mchanmsosvc
+ labels:
+ app: mchanmsopod
+spec:
+ type: NodePort
+ ports:
+ - port: 8080
+ nodePort: 30001
+ protocol: TCP
+ selector:
+ app: mchanmsopod \ No newline at end of file