malaskowski / aet-docker

Docker support for AET - easy to set up local/developer environment with example Docker Swarm configuration.
Apache License 2.0
8 stars 9 forks source link

Support for AET app devs #10

Closed malaskowski closed 5 years ago

malaskowski commented 5 years ago

Developer environment

Since version v0.10.0, example swarm instance supports AET developers. In order to be able to easily deploy AET artifacts on your docker instance follow these steps:

Notice, this example shows how to configure full-stack AET dev environemnt. If you want to e.g. work only over AET bundles, you don't have to configure feature files or report application. Just configure bundles volume and skip adjustments for other parts of AET stack.

  1. Download example-aet-swarm.zip from the release and unzip the files to the folder from where docker stack will be deployed (from now on we will call it AET_ROOT).

  2. Edit aet-swarm.yml and uncomment karaf and report services volumes:

    karaf:
      ...
      volumes:
        - ./configs:/aet/configs
        - ./bundles:/aet/bundles
        - ./features:/aet/features
    
     ...
    
     report:
       ...
       volumes:
         - ./report:/var/www/html
  3. Adjust structure of the AET_ROOT to:

    ├── aet-swarm.yml
    ├── bundles
    ├── configs
    ├── features
    └── report
  4. Build AET application and move all artifacts tho the right places:

    • AET bundles to the bundles directory
    • OSGi feature files into the features
    • configs directory already contains setup configs
    • report files into the report directory
  5. Now like in instance setup steps, run docker stack deploy -c aet-swarm.yml aet to enoy your AET dev stack.