Waziup / Platform-deploy

1 stars 2 forks source link

How to deploy on AWS #1

Closed mtuchi closed 5 years ago

mtuchi commented 5 years ago

Hello @cdupont Am glad i have found this repository, was wondering if you can share a how to guide for deploying in AWS

cdupont commented 5 years ago

In practice to deploy you could do a simple docker-compose up in your VM with that repo: https://github.com/Waziup/Platform. The readme file gives the instructions. In this repo, I've put the proxys configuration for routing the DNS traffic and add SSL (HTTPS). Not sure you need it, though...

mtuchi commented 5 years ago

In practice to deploy you could do a simple docker-compose up in your VM with that repo: https://github.com/Waziup/Platform. The readme file gives the instructions. In this repo, I've put the proxys configuration for routing the DNS traffic and add SSL (HTTPS). Not sure you need it, though...

So i don't need a production.yml file that i have removed all volume bindings for application code, so that code stays inside the container and can’t be changed from outside

Forexample:

production.yml ``` version: "3" services: # Broker mongo: image: mongo:3.2.8 hostname: mongo ports: - "27017:27017" healthcheck: test: echo 'db.stats().ok' | mongo localhost:27017/local --quiet interval: 5s timeout: 5s retries: 12 extra_hosts: - "localhost:127.0.0.1" orion: image: fiware/orion:1.15.0 hostname: orion ports: - "1026:1026" command: -dbhost mongo -logLevel INFO network_mode: host extra_hosts: - "mongo:127.0.0.1" - "localhost:127.0.0.1" depends_on: - "mongo" api-server: build: ./api-server image: waziup/api-server:1.1 ports: - "80:80" environment: - HTTP_PORT=800 - HTTPS_PORT=443 - KEYCLOAK_URL=http://localhost:8080/auth - ORION_URL=http://orion:1026 - ELASTICSEARCH_URL=http://elasticsearch:9200 - MONGODB_URL=mongodb://mongo:27017/waziup_history - SOCIALS_URL=http://socials:9123 - LOG_LEVEL=debug network_mode: host extra_hosts: - "orion:127.0.0.1" - "elasticsearch:127.0.0.1" - "mongo:127.0.0.1" - "socials:127.0.0.1" depends_on: - orion - keycloak - socials # Users identification & authorization keycloak: build: ./keycloak image: waziup/keycloak:1.1 ports: - "8080:8080" environment: - DB_VENDOR=mysql - KEYCLOAK_USER=admin - KEYCLOAK_PASSWORD=${WAZIUP_ADMIN_PASS} - KEYCLOAK_LOGLEVEL=DEBUG - MYSQL_PORT_3306_TCP_ADDR=mysql - MYSQL_PORT_3306_TCP_PORT=3306 # If the realm "waziup" doesn't exists, create it from file entrypoint: "/opt/jboss/tools/docker-entrypoint.sh -b 0.0.0.0 -Dkeycloak.migration.action=import -Dkeycloak.migration.provider=dir -Dkeycloak.migration.strategy=IGNORE_EXISTING -Dkeycloak.migration.dir=/opt/jboss/keycloak/imports" depends_on: - mysql mysql: image: mysql:5.7 hostname: mysql ports: - "13306:3306" environment: - MYSQL_DATABASE=keycloak - MYSQL_USER=keycloak - MYSQL_PASSWORD=password - MYSQL_ROOT_PASSWORD=root_password # Dashboard dashboard: # Specific images should be built for each environment (local, staging, production). image: waziup/dashboard:1.1.1-localhost build: context: ./dashboard args: - SERVER_PORT=3000 - SERVER_URL=http://localhost:3000 - KEYCLOAK_URL=http://localhost:8080/auth - API_SERVER_URL=http://localhost:800/api ports: - "3000:3000" #Socials socials: build: ./socials image: waziup/socials:1.1 ports: - 9123:9123 environment: - MONGODB_URL=mongodb://localhost:27017/waziup_socials depends_on: - mongo ```

Unrelated

@cdupont Does waziup have a slack channel or any communication tool that's is easy to get help ? Am trying to use waziup (am building solution for agriculture) but i get stuck most of the time and i could use some help from your team.

The biggest challenge so far is configuring the gateway. Help of any kind will be much appreciated

cdupont commented 5 years ago

So i don't need a production.yml file that i have removed all volume bindings for application code, so that code stays inside the container and can’t be changed from outside

Not sure I understand. In practice In use the docker-compose.yml for starting the platform locally and testing. You can also use it in a VM. On Amazon, I use ECS where I create the same containers with the same configuration than docker-compose. The code will always stays in the containers. The volumes are used for mounting host folders, I find it easier to save the data for the DBs (Mongo, MySQL).

cdupont commented 5 years ago

Give me your slack username, I'll invite you to the channel.

mtuchi commented 5 years ago

Give me your slack username, I'll invite you to the channel.

You can use this email mtuchidev@gmail.com to invite me Thanks.

cdupont commented 5 years ago

I don't find any slack account with this email

mtuchi commented 5 years ago

I don't find any slack account with this email

Am not in waziup slack, you will have to invite me with that email