Deprecated in favor of Portainer
To get started, checkout the documentation.
To contribute to Miasma, checkout the contributor's guide.
An opinionated managment UI for Docker Swarm
Home Page: https://miasma.aklinker1.io/
License: MIT License
Deprecated in favor of Portainer
To get started, checkout the documentation.
To contribute to Miasma, checkout the contributor's guide.
During CI, to tell Miasma to upgrade a service, we should be able to hit a webhook to tell it to pull the latest image and restart the service.
Dataloaders will improve the efficiency of the API by not requesting the same data twice from a data source. Right now, performance is fine, but as the complexity of the application grows, dataloaders will become necessary.
Stopping and starting services to apply changes has several downsides:
When adding a route to an app, I have to manually restart it before the route shows up on traefik's dashboard or is actually handled properly:
miasma apps:create example -i ealen/echo-server
miasma route:set -a example --host example.com
# Then I have to manually restart the app
miasma apps:restart -a example
Not service or container labels. The API and CLI already support custom placements, but they're too docker-y and I have to look at the docs every time I want to set them up. You also have to use docker commands to assign a node a label.
x.y.z === label
Scaling doesn't exist right now, so I shouldn't see an app on multiple nodes on the UI, but I've seen this when an app is switched between nodes. Probably has something to do with how I'm filtering the service tasks :/
Miasma's second plugin, an image registry.
Right now, we're passing --api.insecure=true
to allow access to the traefik dashboard on port 8080, but that allows everyone access to the dashboard. Lets add additional configuration to the Traefik Plugin's config, so that we can enable the secure dashboard with basic auth:
type TraefikConfig struct {
EnableHttps bool `mapstructure:"enableHttps"`
CertEmail string `mapstructure:"certEmail"`
CertsDir string `mapstructure:"dataDir"`
+ SecureDashboard bool `mapstructure:"secureDashboard"`
+ DashboardRoute string `mapstructure:"dashboardRoute"`
+ DashboardUsername string `mapstructure:"dashboardUsername"`
+ DashboardHtPasswd string `mapstructure:"dashboardHtPasswd"`
}
docker service logs
docker service ps
Editing an app that is stopped will make it restart. I'd prefer to keep it stopped and let the user decide when they want to start it back up.
$ miasma apps:create Test -i ealen:echo-server
$ miasma apps:stop -a Test
$ miasma apps:edit -a Test
$ maisma apps
Apps
- Test (1/1 running)
(1 app)
Before you can run miasma in the cloud, there needs to be some form of authentication. For now, we're just gonna use and environment variable, that you can set when running the docker image:
# Inline
ACCESS_TOKEN=xyz docker run aklinker1/miasma ...
# Or in a .env file
docker run aklinker1/miasma --env-file .env
If no ACCESS_TOKEN
is configured, no authentication will be required, and it will behave as it did before, backwards compatible.
I don't want to add support for users and per-app permissions at this point. Just get something out there that works and can be difficult to hack into.
Add a scale
field to apps, defaulting to 1, and changes the number of replicas for it's docker service.
To scale via the API:
mutation {
editApp(id: "...", changes: { "scale": 5 }) {
scale
}
}
To scale from the CLI:
miasma apps:edit --scale 5
On the UI, wherever we reference app.instances.total
, change it to app.scale
If the docker service isn't restarted, the new environment variables aren't set
I note from the FAQ:
I don't want to SSH into my device every time I want to update the app version or change an environment variable. Ideally, apps should just update auto-magically (watchtower plugin incoming).
I highly recommend swarmupdater which I run in all my production Swarm clusters.
I'm even happy to fork it and maintain it ๐
Curious how hard this would be to add, I think it would work well as a plugin.
Here's a guide for Nginx instead of Traefik: https://finnian.io/blog/ssl-with-docker-swarm-lets-encrypt-and-nginx/
After #49, changelog and auto-versioning is ready to go and will support a second "module", the CLI. All that's left is figuring out the best way to release it. I think the only maintainable option is to use goreleaser, though I've never used it before.
This is mostly just an FYI. You may want to document this somewhere:
root@test:~# curl -fsSL https://get.docker.com | bash -
# Executing docker install script, commit: b2e29ef7a9a89840d2333637f7d1900a83e7153f
+ sh -c 'apt-get update -qq >/dev/null'
E: Repository 'https://apprepo.vultr.com/ubuntu universal InRelease' changed its 'Codename' value from 'buster' to 'universal'
root@test:~# curl -fsSL https://get.docker.com | bash -
# Executing docker install script, commit: b2e29ef7a9a89840d2333637f7d1900a83e7153f
+ sh -c 'apt-get update -qq >/dev/null'
E: Repository 'https://apprepo.vultr.com/ubuntu universal InRelease' changed its 'Codename' value from 'buster' to 'universal'
I don't think you should even bother supporting anything as old as Ubuntu 20.04 anyway IMO.
Requests timeout when large docker images are downloaded.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.