cloudsidedev / appside

Multitenant environment automation.
http://cloudside.ch
GNU Affero General Public License v3.0
38 stars 7 forks source link

appflow-dev-environment #55

Closed ivomarino closed 6 years ago

ivomarino commented 7 years ago

would be interesting to replace atlantis with a Docker based solution. We need to create different containers for each service like nginx, PHP, etc. A valid approach could be docker-compose or Docker definition inside ansible. This task also covers complete rewrite of AppFlow CLI app using Symfony, branch: https://github.com/ttssdev/appflow/tree/55-appflow-dev-environment, bin: https://github.com/ttssdev/appflow/blob/55-appflow-dev-environment/bin/appflow.

Symfony:

ivomarino commented 7 years ago

@89luca89: three container aproach: https://vincent.composieux.fr/article/run-a-symfony-application-using-docker-and-docker-compose and here we just run a single composer command (could be AppFlow): http://ctankersley.com/2015/12/23/dockerize-commands/.

ivomarino commented 7 years ago

this is the way to go for parsing YAML: http://blog.servergrove.com/2014/02/21/symfony2-components-overview-config/.

ivomarino commented 7 years ago

commit https://github.com/ttssdev/appflow/commit/a7355540a6d03cd0f337da68765150043320c16b introduces first YAML config file parsing:

cat ~/.appflow/config.yml

#
# ~/.appflow/config.yml
#
# AppFlow configuration file.
#

appflow:
  tenant:
    id: appflow-ttss
    name: ttss
    default_env: development
./bin/appflow checkout

array:1 [
  "tenant" => array:3 [
    "id" => "appflow-ttss"
    "name" => "ttss"
    "default_env" => "development"
  ]
]

TreeBuilder allows also to define how the YAML structure should be and which fields are required. Further YAML configuration will be done while Defining and Processing Configuration Values.

89luca89 commented 7 years ago

to ensure volume mount on selinux host: chcon -Rt svirt_sandbox_file_t ~/.appflow/

to run and mount .appflow docker run -v $HOME/.appflow:/root/.appflow -ti ttssdev/appflow bash

then in the container just use appflow command

ivomarino commented 6 years ago

can be closed due PIP migration, docker as client is only required on win based envs.