Commit aabf0f1d authored by Spiros Koulouzis's avatar Spiros Koulouzis

added mount disk for ec2

parent 1ea3fb6b
...@@ -179,7 +179,7 @@ node_types: ...@@ -179,7 +179,7 @@ node_types:
disk_size: disk_size:
type: scalar-unit.size type: scalar-unit.size
required: true required: true
default: 30000 MB default: 40000 MB
constraints: constraints:
- greater_or_equal: 15000 MB - greater_or_equal: 15000 MB
mem_size: mem_size:
......
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
- lock-frontend - lock-frontend
- name: Update and upgrade apt packages - name: Update and upgrade apt packages
become: true
apt: apt:
upgrade: yes upgrade: yes
update_cache: yes update_cache: yes
...@@ -41,6 +40,46 @@ ...@@ -41,6 +40,46 @@
- python-pip - python-pip
- virtualenv - virtualenv
- name: Check that the /dev/xvdh exists
stat:
path: /dev/xvdh
register: mount_volume
- debug:
msg: "/dev/xvdh exists"
when: mount_volume.stat.exists
- name: Create a xfs
filesystem:
fstype: xfs
dev: /dev/xvdh
when: mount_volume.stat.exists == True
- name: Creates directory
file:
path: /data
state: directory
when: mount_volume.stat.exists == True
- name: Mount
mount:
path: /data
src: /dev/xvdh
state: present
fstype: xfs
when: mount_volume.stat.exists == True
- name: Change data-root location in /etc/docker/daemon.json
shell: |
echo '{"data-root": "/data"}' > /etc/docker/daemon.json
when: mount_volume.stat.exists == True
- name: Add Docker GPG apt Key - name: Add Docker GPG apt Key
apt_key: apt_key:
url: https://download.docker.com/linux/ubuntu/gpg url: https://download.docker.com/linux/ubuntu/gpg
...@@ -56,7 +95,6 @@ ...@@ -56,7 +95,6 @@
apt: update_cache=yes name=docker-ce state=latest apt: update_cache=yes name=docker-ce state=latest
- name: Update and upgrade apt packages - name: Update and upgrade apt packages
become: true
apt: apt:
upgrade: yes upgrade: yes
update_cache: yes update_cache: yes
......
...@@ -10,13 +10,16 @@ cd provisioner && mvn -Dmaven.test.skip=true dockerfile:build ...@@ -10,13 +10,16 @@ cd provisioner && mvn -Dmaven.test.skip=true dockerfile:build
[ $status -eq 0 ] && echo "build successful" || exit -1 [ $status -eq 0 ] && echo "build successful" || exit -1
cd ../ cd ../
echo "----------Building sure_tosca-flask-server Docker--------------" echo "----------Building sure_tosca-flask-server Docker--------------"
cd sure_tosca-flask-server && docker build -t alogo53/sure-tosca:3.0.0 . # cd sure_tosca-flask-server && docker build -t alogo53/sure-tosca:3.0.0 .
cd sure_tosca-flask-server && docker build -t sure-tosca:3.0.0 .
[ $status -eq 0 ] && echo "build successful" || exit -1 [ $status -eq 0 ] && echo "build successful" || exit -1
echo "----------Building planner Docker--------------" echo "----------Building planner Docker--------------"
cd ../ cd ../
cd planner && docker build -t alogo53/planner:3.0.0 . # cd planner && docker build -t alogo53/planner:3.0.0 .
cd planner && docker build -t planner:3.0.0 .
[ $status -eq 0 ] && echo "build successful" || exit -1 [ $status -eq 0 ] && echo "build successful" || exit -1
echo "----------Building deployer Docker--------------" echo "----------Building deployer Docker--------------"
cd ../ cd ../
cd deployer && docker build -t alogo53/deployer:3.0.0 . # cd deployer && docker build -t alogo53/deployer:3.0.0 .
cd deployer && docker build -t deployer:3.0.0 .
[ $status -eq 0 ] && echo "build successful" || exit -1 [ $status -eq 0 ] && echo "build successful" || exit -1
...@@ -108,7 +108,7 @@ services: ...@@ -108,7 +108,7 @@ services:
- rabbit - rabbit
- mongo - mongo
- sure-tosca - sure-tosca
image: alogo53/manager:3.0.0 image: manager:3.0.0
environment: environment:
RABBITMQ_HOST: rabbit RABBITMQ_HOST: rabbit
MONGO_HOST: mongo MONGO_HOST: mongo
...@@ -117,7 +117,7 @@ services: ...@@ -117,7 +117,7 @@ services:
- "30000:8080" - "30000:8080"
sure-tosca: sure-tosca:
image: alogo53/sure-tosca:3.0.0 image: sure-tosca:3.0.0
ports: ports:
- "8081:8081" - "8081:8081"
...@@ -125,24 +125,24 @@ services: ...@@ -125,24 +125,24 @@ services:
depends_on: depends_on:
- rabbit - rabbit
- sure-tosca - sure-tosca
image: alogo53/planner:3.0.0 image: planner:3.0.0
environment: environment:
RABBITMQ_HOST: rabbit RABBITMQ_HOST: rabbit
#provisioner: provisioner:
#depends_on: depends_on:
#- rabbit - rabbit
#- sure-tosca - sure-tosca
#image: alogo53/provisioner:3.0.0 image: provisioner:3.0.0
#environment: environment:
#RABBITMQ_HOST: rabbit RABBITMQ_HOST: rabbit
#SURE_TOSCA_BASE_PATH: http://sure-tosca:8081/tosca-sure/1.0.0 SURE_TOSCA_BASE_PATH: http://sure-tosca:8081/tosca-sure/1.0.0
deployer: deployer:
depends_on: depends_on:
- rabbit - rabbit
- sure-tosca - sure-tosca
image: alogo53/deployer:3.0.0 image: deployer:3.0.0
environment: environment:
RABBITMQ_HOST: rabbit RABBITMQ_HOST: rabbit
......
...@@ -36,8 +36,8 @@ ...@@ -36,8 +36,8 @@
<artifactId>dockerfile-maven-plugin</artifactId> <artifactId>dockerfile-maven-plugin</artifactId>
<version>1.4.13</version> <version>1.4.13</version>
<configuration> <configuration>
<repository>${docker.image.prefix}/${project.artifactId}</repository> <!--<repository>${docker.image.prefix}/${project.artifactId}</repository>-->
<!--<repository>${project.artifactId}</repository>--> <repository>${project.artifactId}</repository>
<tag>${project.version}</tag> <tag>${project.version}</tag>
</configuration> </configuration>
</plugin> </plugin>
......
...@@ -113,8 +113,8 @@ ...@@ -113,8 +113,8 @@
<artifactId>dockerfile-maven-plugin</artifactId> <artifactId>dockerfile-maven-plugin</artifactId>
<version>1.4.13</version> <version>1.4.13</version>
<configuration> <configuration>
<repository>${docker.image.prefix}/${project.artifactId}</repository> <!--<repository>${docker.image.prefix}/${project.artifactId}</repository>-->
<!--<repository>${project.artifactId}</repository>--> <repository>${project.artifactId}</repository>
<tag>${project.version}</tag> <tag>${project.version}</tag>
</configuration> </configuration>
</plugin> </plugin>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment