Skip to content
Snippets Groups Projects
Commit b5738ce9 authored by matt01671's avatar matt01671
Browse files

minor changes

parent f3feb350
Branches
No related tags found
No related merge requests found
- hosts: localhost
vars_files:
- host_vars/nectar.yaml
gather_facts: true
roles:
- role: openstack-common
- role: openstack-volume
- role: openstack-security-group
- role: cluster-security-group
- role: openstack-instance
- hosts: instances
vars_files:
- host_vars/docker.yaml
gather_facts: true
roles:
- role: openstack-proxy
- role: all-dependencies
- role: all-mount
- role: all-docker
- hosts: web
vars_files:
- host_vars/react.yaml
gather_facts: true
roles:
- role: react-build
# - hosts: localhost
# vars_files:
# - host_vars/nectar.yaml
# gather_facts: true
# roles:
# - role: openstack-common
# - role: openstack-volume
# - role: openstack-security-group
# - role: cluster-security-group
# - role: openstack-instance
# - hosts: instances
# vars_files:
# - host_vars/docker.yaml
# gather_facts: true
# roles:
# - role: openstack-proxy
# - role: all-dependencies
# - role: all-mount
# - role: all-docker
# - hosts: web
# vars_files:
# - host_vars/react.yaml
# gather_facts: true
# roles:
# - role: react-build
- hosts: dbs
......
[web]
[master]
172.26.129.221 ansible_host=172.26.129.221
[slaves]
172.26.132.138 ansible_host=172.26.132.138
172.26.133.98 ansible_host=172.26.133.98
[dbs:children]
master
......
......@@ -6,14 +6,34 @@
name: ['node','npm','grunt','jq']
state: latest
# - debug: var=ansible_default_ipv4.address
- name: Copy harvester
become: yes
template:
src: package-lock.json
dest: package-lock.json
owner: "{{ ansible_user }}"
group: "{{ ansible_user }}"
- name: Copy harvester
become: yes
template:
src: package.json
dest: package.json
owner: "{{ ansible_user }}"
group: "{{ ansible_user }}"
- name: Remove a container
- name: NPM
become: yes
docker_container:
name: couchdb${node}
state: absent
force_kill: yes
script: ./templates/install.sh
# - debug: var=ansible_default_ipv4.address
# - name: Remove a container
# become: yes
# docker_container:
# name: couchdb${node}
# state: absent
# force_kill: yes
- name: Build CouchDB
script: ./templates/run.sh '{{ ansible_default_ipv4.address }}'
......
#!/usr/bin/env bash
sudo apt install -y npm
npm install
\ No newline at end of file
This diff is collapsed.
{
"name": "comp90024",
"version": "3.0.0-SNAPSHOT",
"description": "Building and pushing CouchDB design documents",
"private": true,
"author": {
"name": "Luca Morandini",
"email": "luca.morandini@unimelb.edu.au"
},
"engines": {
"node": ">= 12.10.x",
"npm": ">= 6.10.x"
},
"devDependencies": {
"grunt-cli": "^1.0.x",
"grunt-couch": "^1.5.1"
},
"dependencies": {
"grunt": "^1.1.0"
}
}
......@@ -7,6 +7,12 @@ export VERSION='3.0.0'
export cookie='a192aeb9904e6590849337933b000c99'
export uuid='a192aeb9904e6590849337933b001159'
export node="$1"
export flag="-setcookie \"${cookie}\" -name \"couchdb@${node}\""
if [ ! -z $(sudo docker ps -a -q) ]
then
sudo docker rm -f $(sudo docker ps -a -q) #REMOVE ALL - DELETE
fi
echo "== Pull image =="
sudo docker pull ibmcom/couchdb3:${VERSION}
......@@ -22,10 +28,11 @@ sudo docker create\
-p 5984:5984\
-p 4369:4369\
-p 9100-9200:9100-9200\
-p 5986:5986\
--name couchdb${node}\
--env COUCHDB_USER=${user}\
--env COUCHDB_PASSWORD=${pass}\
--env NOOENAME=couchdb@${node}\
--env NODENAME=couchdb@${node}\
--env COUCHDB_SECRET=${cookie}\
--env ERL_FLAGS="-setcookie \"${cookie}\" -name \"couchdb@${node}\""\
ibmcom/couchdb3:${VERSION}
......@@ -42,6 +49,7 @@ echo "== Change vm.args =="
echo "cd /opt/couchdb/etc/;echo ${NOOENAME} >> vm.args"
sudo docker exec -u root -it couchdb${node} /bin/sh -c "export node=${node}; cd /opt/couchdb/etc/;echo -name couchdb@${node} >> vm.args;exit"
sudo docker exec -u root -it couchdb${node} /bin/sh -c "export cookie=${cookie};cd /opt/couchdb/etc/;echo -setcookie ${cookie} >> vm.args;exit"
sudo docker exec -u root -it couchdb${node} /bin/sh -c "export flag=${flag};cd /opt/couchdb/etc/;echo ${flag} >> vm.args;exit"
# for cont in "${conts[@]}"; do sudo docker exec -u root -it ${cont} bash edit-vm.sh; done
#sudo docker exec -it couchdb bash
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment