Commit 5839e8d0 authored by skoulouzis's avatar skoulouzis Committed by GitHub

Merge pull request #77 from skoulouzis/argo-usecase

sample for composer
parents 96927abc 1527646d
FROM agaveapi/myproxy:latest
RUN yum update -y
RUN yum install wget -y
RUN wget https://raw.githubusercontent.com/EGI-FCTF/fedcloud-userinterface/master/fedcloud-ui.sh
#Build: docker build -t drip-myproxy .
# Run: docker run --name drip-myproxy-inst -d drip-myproxy
......@@ -2,6 +2,7 @@
docker run --hostname my-rabbit --name some-rabbit -p 127.0.0.1:15672:15672 -p 127.0.0.1:4369:4369 -p 127.0.0.1:5671-5672:5671-5672 -p 127.0.0.1:15671:15671 -d rabbitmq:3-management
docker run --name mongo-inst -p 127.0.0.1:27017:27017 -d mongo:3
docker run --name drip-inst -p 127.0.0.1:8080:8080 -d drip-manager
sudo docker run --hostname my-proxy --name some-myproxy -p 7512:7512 -p 7513:7513 -p 10022:22 agaveapi/myproxy
#--------Add admin-----------------
docker exec -t mongo-inst mongo -eval 'db.user.insert({"password":"$2a$10$QdysFgsH0sl6Y4BD84UhGO7yyNfoDPXjjEHkDJ3pX6cRfHDj2Q0BO","roles":["ADMIN"],"username":"admin","accountNonExpired":true,"accountNonLocked":true,"credentialsNonExpired":true,"enabled":true})' localhost/drip
version: '3'
services:
telegreen:
build:
context: ../software/telegreen
image: beia/telegreen
ports:
- "8080:80"
environment:
- MYSQL_ROOT_PASSWORD=doesntmatter
- MYSQL_DATABASE=telegreen
- MYSQL_USER=telegreen
- MYSQL_PASSWORD=password
- MYSQL_HOST=telegreen_db
depends_on:
- telegreen_db
networks:
- db
- monitoring
- external
telegreen_db:
build:
context: ../software/database
image: beia/telegreen_db
environment:
- MYSQL_ROOT_PASSWORD=doesntmatter
- MYSQL_DATABASE=telegreen
- MYSQL_USER=telegreen
- MYSQL_PASSWORD=password
- MYSQL_HOST=telegreen_db
networks:
- db
- monitoring
alerter:
build:
context: ../software/samplegen
image: beia/alerter
command:
- "/srv/beia/scripts/run-node.sh /srv/beia/samplegen app/AlerterApp.class.js"
image: beia/alerter
environment:
- MYSQL_ROOT_PASSWORD=doesntmatter
- MYSQL_DATABASE=telegreen
- MYSQL_USER=telegreen
- MYSQL_PASSWORD=password
- MYSQL_HOST=telegreen_db
depends_on:
- telegreen_db
networks:
- db
- external
samplegen:
build:
context: ../software/samplegen
image: beia/samplegen
command:
- "/srv/beia/scripts/run-node.sh /srv/beia/samplegen app/SampleGeneratorApp.class.js"
ports:
- "8128:8000"
environment:
- MYSQL_ROOT_PASSWORD=doesntmatter
- MYSQL_DATABASE=telegreen
- MYSQL_USER=telegreen
- MYSQL_PASSWORD=password
- MYSQL_HOST=telegreen_db
depends_on:
- telegreen_db
networks:
- db
- external
beia_mon:
build:
context: ../software/monitoring
image: beia/monitoring
depends_on:
- telegreen
- telegreen_db
networks:
- monitoring
- external
networks:
db:
external:
monitoring:
\ No newline at end of file
version: "2"
services:
kamailio:
#build: ./kamailio
image: wtelecom/kamailio:bs1
restart: always
depends_on:
- db
- rtpproxy
environment:
- constraint:node==192.168.10.10
# - PUBLICIP=10.128.19.60
- SWARM_MASTER_IP=192.168.10.10
- SWARM_MASTER_PORT=2377
- SUBNET_OVERLAY=192.168.2.0
- SUFFIX_OVERLAY=int
- SUFFIX_GWBRIDGE=ext
volumes:
# - ./kamailio/config/kamailio:/etc/kamailio
- ./kamailio/pcap:/pcap
ports:
- "5060:5060/udp"
- "5061:5061/udp"
hostname: kamailio
container_name: kamailio
networks:
- uc-ol
rtpproxy:
#build: ./rtpproxy
image: wtelecom/rtpproxy:bs1
restart: always
depends_on:
- db
environment:
- SWARM_MASTER_IP=10.128.19.60
- SWARM_MASTER_PORT=3375
- PORT_MAX=10049
# - PORT_MAX=10099
- PORT_MIN=10000
- SUBNET_OVERLAY=192.168.2.0
- SUFFIX_OVERLAY=int
- SUFFIX_GWBRIDGE=ext
- PORT_RTPPROXY=7711
- DB_KAMAILIO=kamailio_db
- TABLE_RTPPROXY=rtpproxy
- DB_USER=kamailio_user
- DB_PWD=kamailiorw
- DB_HOST=db
- SSH_KAMAILIO_PASSWORD=docker
- SSH_KAMAILIO_USER=root
- KAMAILIO_HOST=kamailio
ports:
# - "10000-10399:10000-10399/udp"
# - "10000-10099/udp"
- "10000:10000/udp"
- "10001:10001/udp"
- "10002:10002/udp"
- "10003:10003/udp"
- "10004:10004/udp"
- "10005:10005/udp"
- "10006:10006/udp"
- "10007:10007/udp"
- "10008:10008/udp"
- "10009:10009/udp"
- "10010:10010/udp"
- "10011:10011/udp"
- "10012:10012/udp"
- "10013:10013/udp"
- "10014:10014/udp"
- "10015:10015/udp"
- "10016:10016/udp"
- "10017:10017/udp"
- "10018:10018/udp"
- "10019:10019/udp"
- "10020:10020/udp"
- "10021:10021/udp"
- "10022:10022/udp"
- "10023:10023/udp"
- "10024:10024/udp"
- "10025:10025/udp"
- "10026:10026/udp"
- "10027:10027/udp"
- "10028:10028/udp"
- "10029:10029/udp"
- "10030:10030/udp"
- "10031:10031/udp"
- "10032:10032/udp"
- "10033:10033/udp"
- "10034:10034/udp"
- "10035:10035/udp"
- "10036:10036/udp"
- "10037:10037/udp"
- "10038:10038/udp"
- "10039:10039/udp"
- "10040:10040/udp"
- "10041:10041/udp"
- "10042:10042/udp"
- "10043:10043/udp"
- "10044:10044/udp"
- "10045:10045/udp"
- "10046:10046/udp"
- "10047:10047/udp"
- "10048:10048/udp"
- "10049:10049/udp"
expose:
- "7711"
# volumes:
# - ./rtpproxy/docker-entrypoint-init:/docker-entrypoint-init
dns:
- 10.128.2.2
- 10.128.2.3
dns_search: wtelecom.es
# dns_opt: options ndots:1
networks:
- uc-ol
db:
#build: ./mysql
image: wtelecom/mysql:bs1
restart: always
environment:
- constraint:node==D-RSC-SWT-DOC01
- MYSQL_ROOT_PASSWORD=supersecret
volumes:
- ./mysql/dataDir:/var/lib/mysql
container_name: db
networks:
- uc-ol
networks:
uc-ol:
driver: overlay
ipam:
driver: default
config:
- subnet: 192.168.2.0/24
ip_range: 192.168.2.0/24
gateway: 192.168.2.1
147.228.242.1
147.228.242.251
147.228.242.252
147.228.242.254
147.228.242.56
147.228.242.58
147.228.242.59
147.228.242.60
......@@ -3,13 +3,16 @@
tasks:
- name: install pre-req
apt: name="{{ item }}" update_cache=yes state=latest
with_items: [python, tcsh, expect, jq , bc, python-pip, python-dev, build-essential, libgeos-dev, nmap, git, screen, parallel]
with_items: [python, tcsh, expect, jq , bc, python-pip, python-dev, build-essential, libgeos-dev, nmap, git, screen, parallel, libffi-dev, libssl-dev,software-properties-common]
become: true
- {name: pip, pip: name=pyproj,become: yes}
- {name: pip, pip: name=shapely, become: yes}
- {name: pip, pip: name=psutil, become: yes}
- {name: pip pika, pip: name=pika, become: yes}
- {name: pip pika, pip: name=klepto, become: yes}
- {name: pip python-dateutil, pip: name=python-dateutil, become: yes}
- {name: pip pymongo, pip: name=pymongo version=2.7.2, become: yes}
- {name: pip numpy, pip: name=numpy, become: yes}
- {name: pip paramiko, pip: name=paramiko, become: yes}
- {name: mkdir, command: mkfs.ext4 /dev/vdc, become: yes}
- {name: create mount point data, file: path=/mnt/data/ state=directory owner=vm_user group=vm_user}
- {name: create mount point source, file: path=/mnt/data/source/ state=directory owner=vm_user group=vm_user}
......
......@@ -67,6 +67,12 @@ def handleDelivery(message):
fo = open(playbook, "w")
fo.write(value)
fo.close()
elif name == "composer":
value = param["value"]
docker-composer = path + "docker-composer.yml"
fo = open(docker-composer, "w")
fo.write(value)
fo.close()
if manager_type == "kubernetes":
ret = docker_kubernetes.run(vm_list)
......@@ -77,6 +83,7 @@ def handleDelivery(message):
ret = docker_swarm.run(vm_list)
if "ERROR" in ret: return ret
ret1 = control_agent.run(vm_list)
#deploy_composer.run(vm_list,docker-composer)
if "ERROR" in ret1: ret = ret1
return ret
elif manager_type == "ansible":
......
......@@ -232,6 +232,8 @@ public class MessageParsing {
InputStream stdout = process.getInputStream();
InputStream stderr = process.getErrorStream();
pipeStream(fileIn, stdin);
}else if (source.equals(SOURCE.CERTIFICATE)) {
}
return "/tmp/x509up_u0";
}
......
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