Para a implantação local da Automação do Luma, os seguintes componentes devem ser instalados no servidor local:
itas_mule_adaptor
mule_run
itas_connectors
itas_service_bus
sa_tunneling_service
Use 'lumauser' para executar todo o recipiente do docker, scripts de implantação e todos os comandos do docker em vez do usuário sudo.
Ações de pré-implantação
Execute as seguintes ações de pré-implantação:
Configurar artefatos
Faça download da versão mais recente do artefato:
b. Copie esse artefato no diretório /platform/deployment.
cd /platform/deployment cd itas-deployment-onprem/deploy
2. Configure "master.properties"
Localize o arquivo master.properties e atualize suas configurações nas respectivas seções.
Se estiver atualizando para a versão mais recente do ITAS, você poderá copiar o arquivo master.properties da release anterior e adicionar as propriedades abaixo na respectiva seção.
############ Common Configuration - BEGIN ############ DOCKER_REGISTRY=registry-1.docker.io STOP_DOCKER_RESTART_ON_APP_STARTUP_FAILURE=false #ENVIRONMENT name should not have space and hyphen(-). #Use only underscore(_) and alphanumeric name in lower case #Example: desdevops ENVIRONMENT= ############ Common Configuration - END ############ ############ Application URLs - BEGIN ############ ITAS_APPLICATION_URL= SA_ONPREM_BRIDGE_URL= ############ Application URLs - END ############ ############ Versions & Servers - BEGIN ############ ITAS_SERVICE_BUS_VERSION= ITAS_MULE_ADAPTOR_VERSION= ITAS_DBUPGRADE_VERSION= ITAS_CONNECTORS_PACKAGE_VERSION= SA_TUNNELLING_SERVICE_VERSION= #ITAS Hosts #Provide ip of the host machine where docker container will run. If all the container are on the same machine then all ip will be same. ITAS_ACTIVEMQ_MASTER_BROKER_SERVER_NAME= ITAS_ACTIVEMQ_SLAVE_BROKER_SERVER_NAME= SA_TUNNELING_ACTIVEMQ_MASTER_BROKER_SERVER_NAME= ITAS_MULE_ADAPTOR_SERVER_NAME= ITAS_MULE_RUN_SERVER_NAME= ############ Versions & Servers - END ############ ############ Database Configuration - BEGIN ############ #ITAS MySQL Database ITAS_DB_HOST_NAME= ITAS_DB_USERNAME= #Use the encryption utility to get the encrypted password and provide it here ITAS_DB_PASSWORD= ITAS_DB_PORT=3306 ITAS_DB_TYPE=MYSQL ITAS_DB_DRIVER=com.mysql.jdbc.Driver #ITAS Mule Database (MySQL) ITAS_MULE_DB_HOST_NAME= ITAS_MULE_DB_USERNAME= #Use the encryption utility to get the encrypted password and provide it here ITAS_MULE_DB_PASSWORD= ITAS_MULE_DB_PORT=3306 ############ Database Configuration - END ############ ############ Base Machine Configuration - BEGIN ############ ITAS_BASE_MACHINE_SERVICE_BUS_DATASTORE_PATH=/platform/data/servicebus_store/itas ITAS_BASE_MACHINE_ATTACHMENTS_STORE_PATH=/platform/data/attachment_store/itas # MULE Run - Base Machine mount paths ITAS_MULE_DIR_PATH=/platform/data/mule_run MULE_RUN_INITIAL_MEMORY=4096 MULE_RUN_MAX_MEMORY=4096 ############ Base Machine Configuration- END ############ ############ Application Ports - START ############ #ITAS ActiveMQ Ports ITAS_ACTIVEMQ_MASTER_BROKER_PORT=61516 ITAS_ACTIVEMQ_SLAVE_BROKER_PORT=61515 #ITAS Jolokia Ports ITAS_MULE_ADAPTOR_JOLOKIA_PORT=7502 ITAS_SERVICE_BUS_MASTER_JOLOKIA_PORT=7505 #ITAS JVM DEBUG Ports TAS_MULE_ADAPTOR_JVM_DEBUG_PORT=2502 SA_TUNNELING_SERVICE_JVM_DEBUG_PORT=2504 ITAS_SERVICE_BUS_MASTER_JVM_DEBUG_PORT=2505 #ITAS JMX Ports ITAS_MULE_ADAPTOR_JMX_PORT=4502 SA_TUNNELING_SERVICE_JMX_PORT=4504 ITAS_SERVICE_BUS_MASTER_JMX_PORT=4505 #Tunneling Service #ActiveMQ ports should be same as application activemq ports. e.g., for ITAS deployment ITAS_ACTIVEMQ_MASTER_BROKER_PORT and SA_TUNNELING_ACTIVEMQ_MASTER_BROKER_PORT should be same. SA_TUNNELING_ACTIVEMQ_MASTER_BROKER_PORT=61516 SA_TUNNELING_SERVICE_PORT=10095 #ITAS Email Configurations #Below credentials used to send email notification for db/ootb content upgrade failure and application emails ITAS_DB_MIGRATION_ERRORS_ENABLE_EMAIL=true ITAS_EMAIL_SERVER_USERNAME= ITAS_EMAIL_SERVER_PASSWORD= ITAS_EMAIL_SERVER_NAME= ITAS_EMAIL_SERVER_PORT= ITAS_DB_MIGRATION_ERRORS_SEND_TO_EMAIL_ADDRESS= ############ Miscellaneous Common - BEGIN ############ #Possible values for ITAS_MULE_DEPLOYMENT are: IN_HOUSE and ON_PREM ITAS_MULE_DEPLOYMENT=ON_PREM MULE_ENCRYPTION_PASSWORD=serviceaide ############ Miscellaneous Common - END ############ ############ On Premise Properties - BEGIN ############ ##These need to be updated once instance registration is performed with ITAS## SA_TUNNELING_TARGET_APP=ITAS SA_TUNNELING_TENANT_EXTERNAL_ID= SA_TUNNELING_APPLICATION_IDENTIFIER= SA_TUNNELING_SECRET_KEY= ############ On Premise Properties - END ############
Configure os ulimits do sistema no arquivo /etc/security/limits.conf
centos soft nproc 16384 centos hard nproc 16384 centos soft nofile 65536 centos hard nofile 65536 lumauser soft nproc 16384 lumauser hard nproc 16384 lumauser soft nofile 65536 lumauser hard nofile 65536 root soft nproc 16384 root hard nproc 16384 root soft nofile 65536 root hard nofile 65536
Efetue logon no dockerhub usando o comando abaixo:
docker login https://registry-1.docker.io -u serviceaideindia # use the dockerhub password provided separately
Ações de implantação
A próxima etapa é implantar recipientes no docker hub.
Para implantar todos os recipientes, incluindo itas_mule_run, itas_service_bus, itas_db_migration, sa_tunneling_service, itas_connectors, use o comando abaixo:
./onprem_stack.sh deployallsudo mkdir -p /platform/data/logs/itas/itas_mule_adaptor sudo mkdir -p /platform/data/logs/itas/itas_db_migration sudo mkdir -p /platform/data/logs/itas/itas_service_bus sudo chmod -R 777 /platform/data/logs/itas sudo mkdir -p /platform/data/attachment_store/itas sudo mdir -p /platform/data/servicebus_store/itas sudo chown -R 1000:1000 /platform/data/servicebus_store/itas sudo chown -R 1000:1000 /platform/data/attachment_store/itas # download mule_run is one time activity sudo wget -q https://repository.mulesoft.org/nexus/content/repositories/public/org/mule/distributions/mule-standalone/3.9.0-hf2/mule-standalone-3.9.0-hf2.zip sudo unzip -qq mule-standalone-3.9.0-hf2.zip sudo mv mule-standalone-3.9.0-hf2 /platform/data/mule_run sudo chown -R 1000:1000 /platform/data/mule_run ./onprem_stack.sh deployall (If we want to deploy all containers at a time)
Se você deseja implantar recipientes individuais, siga o processo abaixo.
Usage: To Deploy mule_run : ./onprem_stack.sh mule_run To Deploy itas_service_bus : ./onprem_stack.sh itas_service_bus To Deploy itas_mule_adaptor : ./onprem_stack.sh itas_mule_adaptor To Deploy itas_connectors : ./onprem_stack.sh itas_connectors To Deploy sa_tunneling_service: ./onprem_stack.sh sa_tunneling_service To Deploy muledb_upgrade : ./onprem_stack.sh muledb_upgrade
Ações pós-implantação
Execute o comando abaixo para limpar volumes, imagens, etc. mais antigos não utilizados após a implantação.
#run command to delete all the unused docker images (This command will not delete docker images that are in use) docker rmi -f $(docker images | awk '{ print $3 }') > /dev/null 2>&1 #cleanup unsed volume, cache etc. docker system prune To check logs sudo tail -f `docker inspect --format='{{.LogPath}}' itas_muledb_migration`
Resolver erros
Se obtivermos o seguinte "erro de permissão negada" : Permissão negada ao tentar conectar-se ao soquete daemon do Docker em unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.37/containers/redis/stop: dial unix /var/run/docker.sock: connects: permissão negada.
[lumauser@lumatrialweb01 deploy]$ docker ps --> If permission denied comes then execute below command. [lumauser@lumatrialweb01 deploy]$ sudo setfacl -m user:lumauser:rw /var/run/docker.sock [lumauser@lumatrialweb01 deploy]$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES [lumauser@lumatrialweb01 deploy]$ docker login (Enter docker credentials)
Garantir que, se a implantação for concluída ou não:
Sempre que inserirmos o comando "Docker ps", poderemos ver o status dos recipientes. Se o status de algum contêiner for inferior a 1 minuto, concentre-se nele e espere 1 ou 2 minutos e emita novamente o mesmo comando 'docker ps', se virmos que o status do mesmo recipiente é inferior a um minuto, poderemos garantir que haverá algum problema e, posteriormente, poderemos prosseguir com "logs do docker [container_name]"deploy]$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES f265d8a51ccc registry-1.docker.io/serviceaide/sa_tunneling_service:1.0.0 "sh -c /opt/app/starâ¦" 19 hours ago Up 18 hours 0.0.0.0:2504->2504/tcp, 0.0.0.0:4504->4504/tcp, 0.0.0.0:10095->10095/tcp sa_tunneling_service 4c778259bf49 registry-1.docker.io/serviceaide/itas_mule_adaptor:1.0.0 "sh -c /opt/app/starâ¦" 19 hours ago Up 19 hours 0.0.0.0:7502->7502/tcp, 0.0.0.0:2106->2502/tcp, 0.0.0.0:2206->4502/tcp itas_mule_adaptor a1bdb2668b05 registry-1.docker.io/serviceaide/itas_service_bus:1.0.0 "sh -c /opt/app/starâ¦" 19 hours ago Up 19 hours 0.0.0.0:7505->7505/tcp, 0.0.0.0:61516->61516/tcp, 0.0.0.0:2102->2505/tcp, 0.0.0.0:2202->4505/tcp itas_service_bus 7d759c5efb61 mule_run:1.0.0 "sh -c /opt/app/starâ¦" 20 hours ago Up 19 hours mule_run