Commit dead52b7 by Adi Amir

Merge remote-tracking branch 'origin/master'

parents f7f22df7 86143df3
No preview for this file type
main server
cd /var/lib/libvirt/images/
qemu-img create -f raw external.img 100G
virsh attach-disk test --source /var/lib/libvirt/images/external.img --target sdb --persistent
On VM
reboot
fdisk -l
cfdisk /dev/sdc (based on the name in fdisk -l)
mkfs.ext4 /dev/sdc
mkdir /mcz
mount /dev/sdc /mcz
add in /etc/fstab
/dev/vda /mcz ext4 defaults 0 0
cd mcz
mv /opt/mcz/user_images .
ln -s /mcz/user_images/ /opt/mcz/user_images
ln -s /mcz/logs/ logs
Export DB from a work environment:
cd /opt/orientdb/bin ./console.sh
orientdb> CONNECT REMOTE:172.16.1.50/MCX root giptmgr
orientdb> EXPORT DATABASE /root/MCX
Login to the new server:
cd /opt/orientdb/bin ./console.sh
Create new DB via web example 172.16.1.9:2480
orientdb> CONNECT REMOTE:172.16.1.31/MCX root giptmgr
orientdb> IMPORT DATABASE /root/MCX_1.gz -preserveClusterIDs=true
From the web:
CREATE INDEX Entity.lat_lon ON Entity(lat,lon) SPATIAL ENGINE LUCENE
rebuild
NAS https://172.16.1.111/index.html - admin - giptmgr
File Server http://172.16.1.2/ - admin - P1cc0ll0
IPCOP - https://172.16.1.254:8443/cgi-bin/index.cgi - admin - giptmgr
Pamela 172.16.1.65 root - P1cc0ll0
Brenda 172.16.1.89 root giptmgr
License server on Pamela + Brenda
1. su - root
2. cd /etc/opt/licenses
3. ./lmdown -c licenses_combined
4. ./lic_srvr_start
Dell gateway ssh 172.16.1.142 ubuntu ubuntu
cd /home/ubuntu/mcx/config/docker
./start_docker_node.bash
SVN 172.16.1.211 root giptmgr
Archiva 172.16.1.132 root giptmgr
Jenkins 172.16.1.5 and 172.16.1.68 root giptmgr
Git 172.16.1.212 root giptmgr
\\172.16.1.2\IT_Support\Network all files for the network:
IPGalleryLAN.doc All the network IP's and their usage, includes the support numbers of Bezeq, Hot and 013
Port_Layout_170605.xls Server, VM, and port layout of the Demo servers.
Netvision accounts Details.docx the details of the 3 accounts we have at 013.
HP computer - password gallery1
egrep -c '(vmx|svm)' /proc/cpuinfo
egrep -c ' lm ' /proc/cpuinfo
apt-get install qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils
adduser `id -un` libvirtd
virsh -c qemu:///system list
apt-get install virt-manager
cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto br0
iface br0 inet static
address 172.16.1.xx
network 172.16.1.0
netmask 255.255.255.0
gateway 172.16.1.101
broadcast 172.16.1.255
dns-nameservers 8.8.8.8
bridge_ports eth0 (change to physical interface name)
bridge_fd 9
bridge_hello 2
bridge_maxage 12
bridge_stp off
remove the virt0 interface.
virsh net-destroy default
virsh net-undefine default
ifconfig -a
reboot
ifconfig -a
open virt-manager and bring up the guest.
\ No newline at end of file
On the Physical server run virt-manager with X-session. Will open the KVM GUI for configuration
All KVM images are under /var/lib/libvirt/images on the physical server.
On the New VM change the following:
Network
vi /etc/network/interfaces
vi /etc/hosts
vi /etc/hostname
Make sure that you have the following parameters in the /etc/sysctl.conf file
_____________________________________
fs.file-max = 65535
vm.overcommit_memory = 1
vm.max_map_count = 262144
# Memory
kernel.shmmax=42949672960
kernel.shmall=10485760
_____________________________________
Reboot – reboot the server
Docker
Change the IP's in the docker yml files under /opt/mcx/config/docker.
Install docker and docker-compose if needed and do the below configuration to work with private repository:
Ubuntu 14.04
cd /root/.docker
vi config.json
{
"auths": {
"172.16.1.212:5050": {
"auth": "YW1pcmE6Z2lwdG1ncnI="
},
"https://172.16.1.212:5050/v2/": {
"auth": "YW1pcmE6Z2lwdG1ncnI=",
"email": "amira"
}
}
}
cd /etc/default/
vi docker (add the below line)
DOCKER_OPTS="--insecure-registry 172.16.1.212:5050 --insecure-registry 172.16.1.132:5000 -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock"
Ubuntu 16.04
Need to also update the following file and the restart:
cd /etc/docker
vi daemon.json
{
"insecure-registries": ["172.16.1.212:5050","172.16.1.132:5000"]
}
Once those files are updated, need to restart Docker with "service docker restart"
Change Admin Profile can be done with Robomongo
No preview for this file type
No preview for this file type
No preview for this file type
#!/bin/csh -f
while 1
Main_Menu:
/bin/clear
echo "Main menu"
echo "---------"
echo "0 - Exit"
echo "1 - SSH"
echo "2 - FTP"
echo -n "Select option =>"
set option = $<
switch ( $option )
case 0:
exit 0
breaksw
case 1:
set method = "ssh -l cassi"
goto CUSTOMER
breaksw
case 2:
set method = ftp
goto CUSTOMER
breaksw
endsw
end
while 1
CUSTOMER:
/bin/clear
echo "Customer:"
echo "---------"
echo "0 - Exit"
echo "2 - Mega"
echo "3 - Cablecolor"
echo "4 - JMData"
echo "5 - Planex"
echo -n "Select option =>"
set option = $<
/bin/clear
echo " "
switch ( $option )
case 0:
exit 0
breaksw
case 2:
goto MEGA
breaksw
case 3:
goto Cablecolor
breaksw
case 4:
goto JMData
breaksw
case 5:
goto Planex
breaksw
endsw
###########################################################
MEGA:
/bin/clear
while 1
echo "Megacable Servers:"
echo "------------------"
echo "0 - Exit "
echo "1 - RTDB GDL "
echo "2 - RTDB GDL BU"
echo "3 - RTDB CLN "
echo "4 - RTDB PUE "
echo -n "Select option => "
set option = $<
/bin/clear
echo " "
switch ( $option )
case 0:
goto Main_Menu
breaksw
case 1:
banner Connect RTDB GDL
$method 200.52.193.203
breaksw
case 2:
banner Connect GDL RTDB BU
$method 200.52.205.108
breaksw
case 3:
banner Connect RTDB CLN
$method 200.52.167.43
breaksw
case 4:
banner Connect RTDB PUE
$method 200.52.173.97
breaksw
goto Main_Menu
end
############################################################
Cablecolor:
/bin/clear
while 1
echo "FiberNet servers:"
echo "---------------"
echo "0 - Exit"
echo "1 - CMS1"
echo -n "Select option => "
set option = $<
/bin/clear
switch ( $option )
case 0:
goto Main_Menu
breaksw
case 1:
banner Connect Cablecolor CMS 1
$method 205.240.200.55
breaksw
endsw
goto Main_Menu
end
############################################################
JMData:
/bin/clear
while 1
echo "JMData servers:"
echo "---------------"
echo "0 - Exit"
echo "1 - CMS Austria Main"
echo "2 - CMS Macedonia Main"
echo "3 - BSS Austria"
echo "4 - RKS"
echo -n "Select option => "
set option = $<
/bin/clear
switch ( $option )
case 0:
goto Main_Menu
breaksw
case 1:
banner Connect CMS Austria Main
$method -p 2430 62.93.80.7
breaksw
case 2:
banner Connect CMS Macedonia Main
$method -p 2430 62.93.80.3
breaksw
case 3:
banner Connect BSS Austria
$method -p 2430 85.13.41.10
breaksw
case 4:
banner Connect RKS
$method -p 2430 capri@82.192.20.60
breaksw
endsw
goto Main_Menu
end
############################################################
Planex:
/bin/clear
while 1
echo "Ortel servers:"
echo "---------------"
echo "0 - Exit"
echo "1 - CMS1 Puerto Rico"
echo "2 - CMS1 Lab"
echo -n "Select option => "
set option = $<
/bin/clear
switch ( $option )
case 0:
goto Main_Menu
breaksw
case 1:
banner Connect CMS1 Puerto Rico
$method -p 2222 186.5.240.21
breaksw
case 2:
banner Connect CMS1 Lab
$method -p 223 24.232.255.2
breaksw
endsw
goto Main_Menu
end
############################################################
version: '2'
services:
elk:
image: sebp/elk
ports:
- "5601:5601"
- "9200:9200"
volumes:
- "/ext/elasticsearch:/var/lib/elasticsearch"
networks:
- backend
fluentd-es:
image: openfirmware/fluentd-elasticsearch
ports:
- "24224:24224"
- "8888:8888"
links:
- elk:elasticsearch
networks:
- backend
# user: elastic, pass:changeme
# before running ,run: sudo sysctl -w vm.max_map_count=262144
# add follwing line in /etc/sysctl.conf
# vm.max_map_count = 262144
# create with geo json
#curl -XPUT "http://localhost:9200/activityidx" -d'{ "mappings": { "activity": { "properties": { "metaData.loc": { "type": "geo_point" } } } } }'
# view
# curl: curl -XGET "http://localhost:9200/activityidx/activity" -d'{ "query": { "match_all": {} }}'
networks:
backend:
driver: bridge
version: '2'
services:
##### Mongo
mongodb:
image: mongo
ports:
- "27017:27017"
volumes:
- "/ext/mongodb/:/data/db"
networks:
- backend
# command: mongod --replSet Server_29
##### Redis
redis:
image: redis
ports:
- "6379:6379"
volumes:
- "/ext/redis/conf/:/usr/local/etc/redis/redis.conf"
- "/ext/redis/:/data/"
networks:
- backend
### Orient
orientdb:
image: aquabiota/orientdb-alpine-spatial
ports:
- "2424:2424"
- "2480:2480"
environment:
ORIENTDB_ROOT_PASSWORD: 'giptmgr'
volumes:
- /ext/orientdb/config:/orientdb/config
- /ext/orientdb/databases:/orientdb/databases
- /ext/orientdb/backup:/orientdb/backup
networks:
- backend
###Open Trip Planner
otp:
image: opentripplanner/opentripplanner
ports:
- "8081:8080"
- "8082:8081"
volumes:
- /var/otp/graphs:/var/otp/graphs
command: --autoScan --server
networks:
- backend
networks:
backend:
driver: bridge
version: '2'
services:
###### transportation ###################
transportation:
environment:
IPG_ENV_PARAMS: "-DdemoMode=minneapolis,modiin,chicago,givatayim#\
-Ddemo.changeRandomality=6#\
-DconfigFile.location=/opt/mcx/config/config.properties#\
-DconfigLocation=/opt/mcx/config/#\
-Dtransportation.updateTrafficLaneTimeout=300000#\
-Dhystrix.command.default.execution.isolation.thread.timeoutInMilliseconds=30000#\
-Dtransportation.dsServer.address=ds:50050#\
-Dds.ip=ds:50050#\
-Dtransportation.mdeServer.address=mde:50040"
USE_DEBUG: "yes"
image: 172.16.1.212:5050/mcx/transportation:29-9207d8
networks:
- backend
# image: 172.16.1.212:5050/mcx/transportation:27-2bb5a9
ports:
- "8300:8000"
- "50035:50035"
####### parking ###################
parking:
environment:
IPG_ENV_PARAMS: "-DdemoMode=minneapolis,chicago,modiin,givatayim#\
-DconfigFile.location=/opt/mcx/config/config.properties#\
-DconfigLocation=/opt/mcx/config/#\
-Dredis.host=redis#\
-Dds.IpAddress=ds:50050#\
-Dds.ip=ds:50050#\
-Dmde.IpAddress=mde:50040#\
-Dhystrix.command.default.execution.isolation.thread.timeoutInMilliseconds=30000"
USE_DEBUG: "yes"
image: 172.16.1.212:5050/mcx/parking:21-e0e2da
# image: 172.16.1.212:5050/mcx/parking:20-d72ebf
# ports:
# - "8015:8000"
# - "50055:50055"
networks:
- backend
## PUBLIC SFAETY
public-safety:
environment:
IPG_ENV_PARAMS: "-DdemoMode=minneapolis,modiin,chicago,givatayim#\
-DpublicSafety.updateCrosswalkTimeout=300000#\
-Dhystrix.command.default.execution.isolation.thread.timeoutInMilliseconds=10000#\
-DconfigFile.location=/opt/mcx/config/config.properties#\
-Dredis.host=redis#\
-DpublicSafety.env.checkEventsDaysBack=180#\
-DconfigLocation=/opt/mcx/config/#\
-DpublicSafety.dsServer.address=ds:50050#\
-Dds.ip=ds:50050#\
-DpublicSafety.env.checkEventsInitialDelay=60#\
-DpublicSafety.env.checkEventsEveryPeriod=300#\
-DpublicSafety.mdeServer.address=mde:50040"
USE_DEBUG: "yes"
image: 172.16.1.212:5050/mcx/public-safety:34-4aa842
# image: 172.16.1.212:5050/mcx/public-safety:33-0a1fbb
ports:
- "8100:8000"
- "50005:50005"
volumes:
- "/opt/mcx/config/repo/public-safety:/opt/mcx/config/repo/public-safety"
networks:
- backend
networks:
backend:
driver: bridge
version: '2'
services:
ui-api:
environment:
IPG_ENV_PARAMS: "-DdataLogic.IpAddress=data-logic:50045#\
-Dmongodb.port=27017#\
-Dds.ip.address=ds#\
-Dds.ip=ds:50050#\
-Dsrg.sip.hostport=178.62.63.127:5076#\
-Dmcweb.sip.ip=178.62.63.127:5060#\
-Dmcweb.ip=178.62.63.127:8011#\
-Dredis.host=redis#\
-Dredis.port=6379#\
-DconfigFile.location=/opt/mcx/config#\
-Dmcz.files.location=/opt/mcz#\
-Dpush.server.url=push-server:50000#\
-Duse.schedular=true#\
-Dcity.reports=san-diego,chicago#\
-Dconfig.public.address=commetoo.com#\
-Drcs.send.message.url=http://178.62.63.127:8060/srg/chat/v1/standalone/sendmessage#\
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=9080"
image: 172.16.1.212:5050/mcx/ui:30-4f7251
ports:
- "8011:8080"
- "9443:8443"
- "9080:9080"
volumes:
- "/opt/mcz/user_images:/opt/mcz/user_images"
networks:
- backend
# log_driver: fluentd
# example for remote fluentd agent
# log_opt:
# fluentd-address: 178.62.63.127:24224
# fluentd-tag: ui-api
### DATA-LOGIC ###
data-logic:
environment:
IPG_ENV_PARAMS: "-Dds.IpAddress=ds:50050#\
-Dredis.host=redis"
image: 172.16.1.212:5050/mcx/data-logic:4-b354b7
ports:
- "8110:8000"
- "50045:50045"
networks:
- backend
# log_driver: fluentd
### PUSH-SERVER ###
push-server:
environment:
IPG_ENV_PARAMS: "-Dredis.host=redis"
USE_DEBUG: "yes"
image: 172.16.1.212:5050/mcx/push-server:7-5847b1
# image: 172.16.1.212:5050/mcx/push-server:5-f07d6e
ports:
- "8120:8000"
- "50000:50000"
networks:
- backend
# log_driver: fluentd
### UI-WEB-CONTROL (NGINX + WEB)
ui-web-control:
environment:
CAMERA_API: "62.90.201.74:9090"
image: 172.16.1.212:5050/mcx/ui-web:control-center-108-a747b6c55de4fb67ce0220a29a08500b23b60ae5
# image: 172.16.1.212:5050/mcx/ui-web:control-center-105-c32f1568bc6435e14af302bc2d835658d39b8e00
volumes:
- "/opt/mcx/config/repo/public-safety:/usr/share/nginx/html/repo/public-safety"
networks:
- backend
### UI-WEB-CLIENT (NGINX + WEB)
ui-web-client:
image: 172.16.1.212:5050/mcx/ui-web:client-25-fc74e8fe1b9cf7fbca90ad3b4da9fc3187bf4d1e
# image: 172.16.1.212:5050/mcx/ui-web:client-21-05b257231da974b95e31fb406ab5c4bc49403be7
links:
- ui-api
- srg
networks:
- backend
# Driver
ui-web-driver:
image: 172.16.1.212:5050/mcx/ui-web:driver-11-0a1f26cdf30b6734909f9c815a0b98c83b1a2c01
# image: 172.16.1.212:5050/mcx/ui-web:driver-10-08064e96f686e435f203b00d0d8b36cbc258f886
links:
- ui-api
- srg
networks:
- backend
### SRG + COMM-LOGIC
comm-logic:
environment:
IPG_ENV_PARAMS: "-Dds.ip=ds:50050#\
-Dredis.host=redis#\
-Dsrg.sip.hostport=178.62.63.127:5076#\
-Dexternal.host.port=178.62.63.127:5076#\
-Drcs.send.message.url=http://178.62.63.127:8060/srg/chat/v1/standalone/sendmessage#\
-Dpush.server.bulk=20#\
-Dpush.server.url=push-server:50000#\
-Dserver.worker.threads=1"
USE_DEBUG: "yes"
image: 172.16.1.212:5050/mcx/comm-logic:16-16e2b7
ports:
- "8130:8000"
- "50030:50030"
networks:
- backend
# log_driver: fluentd
srg:
environment:
IPSIPStack_HostName: 178.62.63.127
IPSIPStack_InternalHostNameComSrv: 0.0.0.0
IPSIPStack_NumOfPorts: 1
IPSIPStack_Port1Number: 5076
IPSIPStack_InternalPort1NumberComSrv: 5076
IPSIPStack_UseWebSocket: Y
IPSIPStack_WebSocketServerPortNumber: 7681
SessCntrl_RegisterPortNumber: 5076
SIPC_MyHostName: 178.62.63.127:8080
SIPC_MCServicesServerHost: http://178.62.63.127:50030/CommLogic/api/
# extra_hosts:
# - "pcscf.open-ims.test:0.0.0.0"
# - "scscf.open-ims.test:172.16.1.244"
image: 172.16.1.132:5000/ipgallery/srg
ports:
- "5076:5076/udp"
- "7681:7681"
- "8060:80"
privileged: true
volumes:
- "/tmp/srg:/cassi/log"
networks:
- backend
### DS ###
ds:
environment:
IPG_ENV_PARAMS: "-Dmongodb.port=27017#\
-Dds.mongodb.host=mongodb#\
-Dredis.port=6379#\
-Dredis.host=redis#\
-DconfigFile.location=/opt/mcx/config#\
-Dmcz.files.location=/opt/mcx#\
-Dds.orientdb.url=remote:orientdb#\
-Ddao.use.cache=false#\
-Ddao.es.activity.url=activityidx/activity#\
-Ddao.es.activity.hostport=elk:9200"
# -Dds.sap.hana.url=35.156.55.64:8000#\
# -Dhystrix.command.default.execution.isolation.thread.timeoutInMilliseconds=10000#\
USE_DEBUG: "yes"
image: 172.16.1.212:5050/mcx/ds:21-837052
ports:
- "8012:50050"
- "7443:8443"
- "8190:8000"
networks:
- backend
## FRONT END
front-end:
environment:
OTP_SERVER: "otp:8081"
KIBANA_SERVER: "elk:5601"
CAMERA_STREAM: "62.90.201.74:9081"
CAMERA_API: "62.90.201.74:9090"
PUBLIC_SAFETY_CAMERA: "24.172.188.211:16000"
TRANSPORTATION_SERVER: "transportation:50035"
PARKING_SERVER: "parking:50055"
PUBLIC_SAFETY_PORT_50005_TCP_ADDR: "public-safety"
PUBLIC_SAFETY_PORT_50005_TCP_PORT: "50005"
UI_API_PORT_8080_TCP_ADDR: ui-api
PUBLIC_SAFETY_IC_PORT_50004_TCP_ADDR: "public-safety-ic"
# PUBLIC_SAFETY_IC_PORT_50004_TCP_PORT: "50004"
EMAIL: "avi.junowicz@ipgallery.com"
URL: "commetoo.com"
SUBDOMAINS: ""
TZ: "Israel"
image: 172.16.1.212:5050/mcx/front-end:1-22e360
ports:
- "80:80"
- "443:443"
- "444:444"
links:
# - ui-api
- srg
# - ui-web-client
# - ui-web-control
# - ui-web-driver
# - public-safety
# - public-safety-ic
#extra_hosts:
# - "parking:parking"
privileged: true
volumes:
- "/opt/mcz/config-letsencrypt/:/config:rw"
networks:
- backend
###### mde ###################
mde:
environment:
IPG_ENV_PARAMS: "-Dds.IpAddress=ds:50050#\
-Dredis.host=redis"
USE_DEBUG: "yes"
image: 172.16.1.212:5050/mcx/mde:19-3ebc7c
# image: 172.16.1.212:5050/mcx/mde:15-f25d9f
ports:
- "8200:8000"
- "50040:50040"
# extra_hosts:
# - "parking:178.62.63.127"
# - "transportation:178.62.63.127"
# - "public-safety:178.62.63.127"
networks:
- backend
## Public Safety IC
public-safety-ic:
environment:
IPG_ENV_PARAMS: "-Dds.IpAddress=ds:50050#\
-Dredis.host=redis#\
-DconfigFile.location=/opt/mcx/config/ICPublicSafety/config.properties
-DconfigLocation=/opt/mcx/config/ICPublicSafety/
-Duse.iot.reporting=false"
USE_DEBUG: "yes"
image: 172.16.1.212:5050/mcx/public-safety:ic-20-17603423ab703d89765f19636ba71dc98b81e616
# image: 172.16.1.212:5050/mcx/public-safety:ic-19-9fb286e80940947addfeb342169e44f20f7134ab
ports:
- "50004:50004"
networks:
- backend
networks:
backend:
driver: bridge
version: '2'
services:
##### Jenkins
jenkins:
image: jenkins
ports:
- "8080:8080"
- "50000:50000"
volumes:
- "/mnt/volume-nyc1-01/jenkins:/var/jenkins_home"
- "/usr/share/gradle:/var/jenkins_home/gradle_home"
- "/usr/lib/jvm/java-8-oracle:/usr/lib/jvm/default-java"
networks:
- develop
##### archiva
archiva:
image: xetusoss/archiva
ports:
- "8081:8080"
volumes:
- "/mnt/volume-nyc1-01/archiva:/archiva-data"
# - "/mnt/volume-nyc1-01/archiva/data:/var/archiva/data"
# - "/mnt/volume-nyc1-01/archiva/conf:/var/archiva/conf"
networks:
- develop
#### GITLAB
#### root admin: user: root , pass: giptmgr1
gitlab:
image: gitlab/gitlab-ce:9.3.6-ce.0
restart: always
hostname: 'municipalitybank.com'
environment:
GITLAB_OMNIBUS_CONFIG: |
gitlab_rails['gitlab_shell_ssh_port'] = 2224
nginx['custom_gitlab_server_config'] = "location ^~ /.well-known { root /var/www/letsencrypt; }"
external_url 'https://municipalitybank.com'
registry_external_url 'https://municipalitybank.com:5050'
nginx['redirect_http_to_https'] = true
nginx['ssl_certificate'] = "/etc/letsencrypt/live/municipalitybank.com/fullchain.pem"
nginx['ssl_certificate_key'] = "/etc/letsencrypt/live/municipalitybank.com/privkey.pem"
registry_nginx['ssl_certificate'] = "/etc/letsencrypt/live/municipalitybank.com/fullchain.pem"
registry_nginx['ssl_certificate_key'] = "/etc/letsencrypt/live/municipalitybank.com/privkey.pem"
ports:
- "443:443"
- "80:80"
- "2224:22"
- "5050:5050"
volumes:
- "/mnt/volume-nyc1-01/gitlab/config:/etc/gitlab"
- "/mnt/volume-nyc1-01/gitlab/logs:/var/log/gitlab"
- "/mnt/volume-nyc1-01/gitlab/data:/var/opt/gitlab"
- "/mnt/volume-nyc1-01/gitlab/backups:/var/opt/gitlab/backups"
- "/mnt/volume-nyc1-01/gitlab/letsencrypt:/var/www/letsencrypt"
- "/mnt/volume-nyc1-01/gitlab/letsencrypt:/etc/letsencrypt"
networks:
- develop
networks:
develop:
driver: bridge
\ No newline at end of file
##### Mongo
mongodb:
image: mongo
ports:
- "27017:27017"
volumes:
- "/ext/mongodb/:/data/db"
# command: mongod --replSet Server_50
##### Redis
redis:
image: redis
ports:
- "6379:6379"
volumes:
- "/ext/redis/conf/:/usr/local/etc/redis/redis.conf"
- "/ext/redis/:/data/"
### Orient
orientdb:
image: aquabiota/orientdb-alpine-spatial
ports:
- "2424:2424"
- "2480:2480"
environment:
ORIENTDB_ROOT_PASSWORD: 'giptmgr'
volumes:
- /ext/orientdb/config:/orientdb/config
- /ext/orientdb/databases:/orientdb/databases
- /ext/orientdb/backup:/orientdb/backup
###Open Trip Planner
otp:
image: opentripplanner/opentripplanner
ports:
- "8081:8080"
- "8082:8081"
volumes:
- /var/otp/graphs:/var/otp/graphs
command: --autoScan --server
1) get san-diego files from the web.
- cd /var/otp/graphs/san-diego
- wget https://s3.amazonaws.com/metro-extracts.mapzen.com/san-diego_california.osm.pbf
- wget https://www.sdmts.com/google_transit_files/google_transit.zip
2) get chicago files from the web.
- cd /var/otp/graphs/chicago
- wget http://www.transitchicago.com/downloads/sch_data/google_transit.zip
- wget https://s3.amazonaws.com/metro-extracts.mapzen.com/chicago_illinois.osm.pbf
3) build Graph.obj for san-diego & chicago .
- cd /var/otp/graphs
- docker run -it -v $(pwd):/var/otp/graphs opentripplanner/opentripplanner --build /var/otp/graphs/san-diego --analyst
- docker run -it -v $(pwd):/var/otp/graphs opentripplanner/opentripplanner --build /var/otp/graphs/chicago --analyst
4) run server(allready in docker-compose):
- cd /var/otp/graphs
- docker run -p 8081:8080 -p 8082:8081 -it -v /var/otp/graphs:/var/otp/graphs opentripplanner/opentripplanner --autoScan --server
#!/bin/bash
DATE=`date '+%y%m%d'`
cd /var/otp/graphs/san-diego
rm *.pbf
rm *.zip
wget https://s3.amazonaws.com/metro-extracts.mapzen.com/san-diego_california.osm.pbf
wget https://www.sdmts.com/google_transit_files/google_transit.zip
mv Graph.obj Graph.obj_$DATE
gzip Graph.obj_$DATE
cd /var/otp/graphs/chicago
rm *.pbf
rm *.zip
wget http://www.transitchicago.com/downloads/sch_data/google_transit.zip
wget https://s3.amazonaws.com/metro-extracts.mapzen.com/chicago_illinois.osm.pbf
mv Graph.obj Graph.obj_$DATE
gzip Graph.obj_$DATE
cd /var/otp/graphs
docker run -it -v /var/otp/graphs:/var/otp/graphs opentripplanner/opentripplanner --build /var/otp/graphs/san-diego --analyst
docker run -it -v /var/otp/graphs:/var/otp/graphs opentripplanner/opentripplanner --build /var/otp/graphs/chicago --analyst
cd /opt/mcx/config/docker
PROCESS=`docker ps | grep _otp_ | awk '{print $14}'`
if [ -v PROCESS ]
then
docker-compose -f mcx-poc-db.yml stop otp
docker-compose -f mcx-poc-db.yml rm -f otp
docker-compose -f mcx-poc-db.yml up -d otp
fi
#!/bin/bash #!/bin/bash
# Delete all containers # Delete all containers
docker rm $(docker ps -a -q) docker rm -f $(docker ps -a -q)
# Delete all dangling images # Delete all dangling images
docker rmi $(docker images -f "dangling=true" -q) docker rmi $(docker images -f "dangling=true" -q)
# delete all volumes
docker volume rm `docker volume ls | awk '{print $2}'`
#!/bin/bash
# Delete all dangling images
docker rmi $(docker images -f "dangling=true" -q)
#!/bin/sh
sudo docker rm -f `sudo docker ps -a | grep "Exit" | awk '{print $1}'`
sudo docker rm -f `sudo docker ps -a | grep "Created" | awk '{print $1}'`
#!/bin/bash
gzfile="containers.tar"
gzcmpfile=$gzfile
gzcmpfile+=".gz"
rm "$gzcmpfile"
touch "$gzfile"
while read -r line ; do
name=$(echo "$line" | sed -r 's/[.:/]+/_/g')
echo "Processing $line"
name+=".tar"
docker save -o "$name" "$line"
tar rvf "$gzfile" "$name"
rm "$name"
done < <(docker ps | awk '{print $2}' | grep -v ID)
echo "gzipping..."
gzip "$gzfile"
echo "cleaning..."
#rm "$gzfile"
\ No newline at end of file
#!/bin/bash
tarfile="containers.tar"
gzcmpfile=$tarfile
gzcmpfile+=".gz"
gunzip "$gzcmpfile"
tar xvf "$tarfile"
rm "$tarfile"
while read -r line ; do
echo "extracting image from $line"
docker load --input "$line"
rm "$line"
done < <(ls -l *.tar | awk '{print $9}')
This diff could not be displayed because it is too large.
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 sign in to comment