[关闭]
@saltyang 2019-01-17T09:44:03.000000Z 字数 2629 阅读 944

EMS Deploy Document

ems docker deploy


Software Version

  • Host VM : Centos 7.x
  • Docker Engine Version: 1.12.6
  • Docker Compose Version: 1.18.0
  • Docker Redis Image Version: 4.0.2
  • Docker Rabbitmq Image Version: 3.6.14
  • Docker Mysql Image Version: 5.7
  • Docker Centos Image Version: 6.7
    Note:You can unzip ems_images.tar.gz and load these image: docker load -i ems_base.tar

Install Docker in Linux

#Install docker enginee

  • yum install docker-io or curl -fsSL https://get.docker.com/ | sh

#restart docker service

  • service docker start

#start docker deamon when machine power on

  • chkconfig docker on

Note: [Centos7装docker][1]

Run docker-compose

# Install docker-compose (Note : docker-compose version is 1.18.0)

Deploy

Note : The port of sshd is ems_server: 50001 . The address of mysql/redis/rabbitmq use service name in docker-compose.yml. For Example: mysql address should be ems_mysql which is mapping to a ip address via host file in container.

Example:

  1. "Recevier": {
  2. "host": "192.168.1.153",
  3. "port": 18443
  4. },
  5. "TargetHost": {
  6. "host": "192.168.1.153"
  7. }, # EMS Server & Portal deploy address
  8. "FileServer": {
  9. "host": "192.168.1.178"
  10. }, # NFS Server address
  11. mysql database address
  12. "Database": {
  13. "engine": "django.db.backends.mysql",
  14. "host": "ems_mysql",
  15. "password": "puyacn#1..",
  16. "name": "ems",
  17. "user": "root"
  18. },
  19. redis address
  20. "Redis": {
  21. "serverIP": "ems_redis",
  22. "servicePort": "6379",
  23. "password": "111111"
  24. },
  25. rabbitmq-server
  26. "RabbitMQ": {
  27. "serverIP": "ems_rabbitmq",
  28. "sericePort": "5672",
  29. "user": "ems",
  30. "password": "emspwd",
  31. "vhost": "vhost_ems",
  32. "smsQueue": "smsqueue",
  33. "emailQueue": "emailqueue"
  34. },
  1. # Prepare:
  2. Deploy machine need install python 2.7.x and install fabric
  3. # Build rpm package
  4. cd ~/project/ems/deploy
  5. ./build.sh ems all
  6. # deploy
  7. fab -f deploy.py prepare
  8. fab -f deploy.py launch_ems
  9. fab -f deploy.py install_se_rpm
  10. fab -f deploy.py init_service
  1. # Build rpm package
  2. cd ~/project/ems/deploy
  3. ./build.sh recevier
  4. # deploy
  5. fab -f deploy.py prepare
  6. fab -f deploy.py launch_ems (if ems_server has lauched all images, this step need skip)
  7. fab -f deploy.py install_re_rpm
  8. fab -f deploy.py init_re_service

Note:

添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注