Refactor container and configuration
diff --git a/containers/vpn/Dockerfile b/containers/openvpn/Dockerfile
similarity index 100%
rename from containers/vpn/Dockerfile
rename to containers/openvpn/Dockerfile
diff --git a/containers/vpn/Makefile b/containers/openvpn/Makefile
similarity index 92%
rename from containers/vpn/Makefile
rename to containers/openvpn/Makefile
index 6004e76..bdfb126 100644
--- a/containers/vpn/Makefile
+++ b/containers/openvpn/Makefile
@@ -1,4 +1,4 @@
-IMAGE_NAME:=xosproject/xos-vpn
+IMAGE_NAME:=xosproject/xos-openvpn
CONTAINER_NAME:=xos-synchronizer
NO_DOCKER_CACHE?=true
diff --git a/containers/vpn/conf/ansible-hosts b/containers/openvpn/conf/ansible-hosts
similarity index 100%
rename from containers/vpn/conf/ansible-hosts
rename to containers/openvpn/conf/ansible-hosts
diff --git a/containers/vpn/conf/synchronizer.conf b/containers/openvpn/conf/synchronizer.conf
similarity index 100%
rename from containers/vpn/conf/synchronizer.conf
rename to containers/openvpn/conf/synchronizer.conf
diff --git a/xos/configurations/vpn/Makefile b/xos/configurations/openvpn/Makefile
similarity index 84%
rename from xos/configurations/vpn/Makefile
rename to xos/configurations/openvpn/Makefile
index 0ec4a35..cb378c0 100644
--- a/xos/configurations/vpn/Makefile
+++ b/xos/configurations/openvpn/Makefile
@@ -10,10 +10,16 @@
sudo MYIP=$(MYIP) docker-compose run xos python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/configurations/common/base.yaml
sudo MYIP=$(MYIP) docker-compose run xos python /opt/xos/tosca/run.py padmin@vicci.org /root/setup/nodes.yaml
+frontend:
+ sudo make -f ../common/Makefile.prereqs
+ sudo docker-compose up -d
+ bash ../common/wait_for_xos.sh
+ sudo docker-compose run xos python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/configurations/frontend/sample.yaml
+
containers:
cd ../../../containers/xos; make devel
cd ../../../containers/synchronizer; make
- cd ../../../containers/vpn; make
+ cd ../../../containers/openvpn; make
common_cloudlab:
make -C ../common -f Makefile.cloudlab
diff --git a/xos/configurations/vpn/docker-compose.yml b/xos/configurations/openvpn/docker-compose.yml
similarity index 82%
rename from xos/configurations/vpn/docker-compose.yml
rename to xos/configurations/openvpn/docker-compose.yml
index 273e8c6..478653c 100644
--- a/xos/configurations/vpn/docker-compose.yml
+++ b/xos/configurations/openvpn/docker-compose.yml
@@ -17,8 +17,8 @@
- ../common/xos_common_config:/opt/xos/xos_configuration/xos_common_config:ro
- ./images:/opt/xos/images:ro
-xos_synchronizer_vpn:
- image: xosproject/xos-vpn
+xos_synchronizer_openvpn:
+ image: xosproject/xos-openvpn
command: bash -c "sleep 120 ; python /opt/xos/synchronizers/vpn/vpn-synchronizer.py -C /opt/xos/synchronizers/vpn/vpn_config"
labels:
org.xosproject.kind: synchronizer
@@ -28,12 +28,12 @@
extra_hosts:
- ctl:${MYIP}
volumes:
- - ../setup/id_rsa:/opt/xos/synchronizers/vpn/vpn_private_key:ro # private key
+ - ../setup/id_rsa:/opt/xos/synchronizers/openvpn/openvpn_private_key:ro # private key
volumes_from:
- - xos_synchronizer_vpn_data:rw
+ - xos_openvpn_data:rw
-xos_synchronizer_vpn_data:
- image: xosproject/xos-vpn
+xos_openvpn_data:
+ image: xosproject/xos-openvpn
links:
- xos_db
extra_hosts:
@@ -49,7 +49,7 @@
# org.xosproject.target: swarm
xos:
- image: xosproject/xos-vpn
+ image: xosproject/xos-openvpn
command: python /opt/xos/manage.py runserver 0.0.0.0:8000 --insecure --makemigrations
ports:
- "9999:8000"
@@ -59,4 +59,4 @@
- ../setup:/root/setup:ro
- ../common/xos_common_config:/opt/xos/xos_configuration/xos_common_config:ro
volumes_from:
- - xos_synchronizer_vpn_data:rw
+ - xos_openvpn_data:rw