Most of software companies encounter similar problems. Configurations for different environments, missing dependencies, walls of text in readme files describing how to run and configure application from scratch, or (in optimistic version) a multitude of scripts. Along with growth of Ganymede we were forced to face these issues, and ensure they won't slow down further development. Right now, we've reached a point where we can gladly look forward to further growth, and focus on creating new games and features for our players.
4. THE BEGINNING.
• „Awesome Panel”.
• Written 5 years ago.
• Just add one feature, it’s really important.
5. LET’S GET STARTED.
• Unknown technologies = unknown configurations.
• Uncommon technologies.
• Just because it works in production, doesn’t mean it works in dev.
7. ADDING THE FEATURE.
• There’s no jenkins task nor deployment script.
• Actually there is a script, hidden somewhere on some server.
• It’s deprecated.
9. SO WHAT WAS THE PROBLEM EXACTLY?
• Application configuration in development/production environment.
• Knowledge about applications disappears over time.
• Sometimes it’s not even clear where a service is running.
11. SO, WHAT IS ARMADA?
• A complete platform for microservices which handles:
• Development,
• Deployment,
• Configuration.
• Enhances Docker with microservices oriented features.
12. ARMADA’S FEATURES.
• Service discovery.
• Clustering.
• Load balancing.
• Configuration deployment.
• Health checks.
• Disaster recovery.
• Dynamic DNS configuration.
• Instant setup on development environment.
13. TECHNOLOGY BEHIND ARMADA.
• Consul – Distributed services catalog.
• Stores information about running services.
• HAProxy – Load balancer.
• Maps services` addresses inside the container.
• Supervisord – Process control system.
• Executes services and scripts.
• Vagrant.
16. SERVICE LEVEL DEPENDENCIES.
• Applications running on static ports, e.g.:
• Backend: 10.0.0.1:30000
• Frontend: 10.0.0.1:30001
• Which leads to:
• Conflicts.
• Longer Readmes.
• On the large scale: Pain in the very lower back.
20. AUTOMATIC LOAD BALANCING.
• Discovered services are automatically load balanced using `round-
robin` method.
• Services with `critical` state are omited by load balancer.
21. SERVICES’ STATES.
Armada services use health checks to set states:
• Passing
• service works.
• Warning
• service works but there’s something wrong.
• Critical
• service doesn’t work.
22. CUSTOM HEALTH CHECKS.
• By default every service only checks whether port 80 is open.
• Yes – passing.
• No – critical.
• Custom health checks can be added to `health-checks` directory
anywhere inside the project.
• Default health check can be over overidden.
23. MULTIPLE ENVIRONMENTS.
• Changed with one argument on container launch, e.g.:
• armada run my-backend --env dev
• armada run my-backend --env production
• Requires you to simply have a configuration directory with env-
corresponding name inside your project.
27. COURIER.
• Sometimes it’s necessary to keep configuration in a separate
repository.
• Courier fetches config code from git repository and distributes it to
selected Armadas.
• Such config is available via `hermes` config provider script.
28. COURIER.
1. Create Courier configuration.
A. Specify destination Armadas.
B. Specify git repos with branch to check out.
2. Run Courier service in any armada cluster.
3. Now, everytime a repo is pushed to, your config will be distributed
among specified Armadas.