I am currently developing a commercial application. For a variety of reasons,
I've decided to not use languages/runtimes/hosting services that I've used in
the past, e.g. pulumi + terraform deploying python/java/go microservices to
ubuntu server instances running on aws (docker/fargate, etc.).
This time, I am using languages/runtimes/hosting services that I want to
use, e.g. gleam + erlang deploying to jails on FreeBSD host instances running on hetzner
or similar providers.
For context, I'm relatively new to FreeBSD. I have read MW Lucas' books such
as: Absolute OpenBSD, Absolute FreeBSD, and I am currently reading FreeBSD
Mastery : Jails. After that, I have his books on network administration and ZFS
queued up...
My questions revolve around how to deploy and manage my systems. I plan
to start with a single server, and use jails to partition my
environments (dev, stage, prod). Each environment will have these services
running: a webserver, a database (postgres), and a backend. I plan to put each
service in it's own jail, and only allow specific traffic between the jails,
e.g. the webserver can access the backend, the backend can access the
database. I'll only allow external traffic over https to the webserver.
From the start, I'll need to be able to easily and quickly deploy new code and
database schemas, run tests, etc.
As my customer base grows, I'll need to be able to easily grow my tech stack,
migrate to a larger hosts, add warm backup hosts in different datacenters, etc.
Clearly I don't want to manually configure any of this. I want to use standard dev/ops
practices and use infrastructure as code. I know how to do this in other realms,
but not on FreeBSD...
I've heard of folks using the following for iac and deployment orchestration in
FreeBSD:
* bsddeploy : https://github.com/ployground/bsdploy
(mentioned in MW Luca's Jails book)
* ansible jexec plugin : https://blog.hofstede.it/managing-freebsd-jails-with-ansible-the-jailexec-connection-plugin/
* ansible tutorial : https://eoli3n.github.io/2021/06/08/jails-part-1.html
* iocage module for Ansible : https://github.com/vbotka/ansible-iocage
* ansible tutorial : https://tudorr.ro/blog/ansible-service-in-jail/
* install ansible on freebsd : https://www.adminbyaccident.com/freebsd/how-to-freebsd/how-to-install-ansible-on-freebsd/
* gread reddit comment on this topic: https://www.reddit.com/r/freebsd/comments/ic02up/help_me_better_understand_jail_networking/
* iocage : https://iocage.readthedocs.io/en/latest/
* vnet presentation slides : https://freebsdfoundation.org/wp-content/uploads/2020/03/Jail-vnet-by-Examples.pdf
So I was thinking, sure Ansible is the "way to go"... but then I stumbled
accross DtxdF 's AppJail:
* https://github.com/DtxdF/AppJail
And then there's more potentially cool stuff that takes this from docker to
docker compose or docker swarm like functionality:
* https://github.com/DtxdF/director
* https://github.com/DtxdF/overlord/wiki
So my questions are:
* What are you using for IAC and deployment orchestration?
* What have your experiences been with Ansible|AppJail|something else?
* What would you recommend in my situation?
(I'm giving myself a month to try and fully understand this space and get my first live FreeBSD host up and running)
* Would you run all 3 environments on the same host, or is that going to give me heartache in weird ways
(e.g. database's somehow conflicting?)
Thank you in advance!
I've decided to not use languages/runtimes/hosting services that I've used in
the past, e.g. pulumi + terraform deploying python/java/go microservices to
ubuntu server instances running on aws (docker/fargate, etc.).
This time, I am using languages/runtimes/hosting services that I want to
use, e.g. gleam + erlang deploying to jails on FreeBSD host instances running on hetzner
or similar providers.
For context, I'm relatively new to FreeBSD. I have read MW Lucas' books such
as: Absolute OpenBSD, Absolute FreeBSD, and I am currently reading FreeBSD
Mastery : Jails. After that, I have his books on network administration and ZFS
queued up...
My questions revolve around how to deploy and manage my systems. I plan
to start with a single server, and use jails to partition my
environments (dev, stage, prod). Each environment will have these services
running: a webserver, a database (postgres), and a backend. I plan to put each
service in it's own jail, and only allow specific traffic between the jails,
e.g. the webserver can access the backend, the backend can access the
database. I'll only allow external traffic over https to the webserver.
From the start, I'll need to be able to easily and quickly deploy new code and
database schemas, run tests, etc.
As my customer base grows, I'll need to be able to easily grow my tech stack,
migrate to a larger hosts, add warm backup hosts in different datacenters, etc.
Clearly I don't want to manually configure any of this. I want to use standard dev/ops
practices and use infrastructure as code. I know how to do this in other realms,
but not on FreeBSD...
I've heard of folks using the following for iac and deployment orchestration in
FreeBSD:
* bsddeploy : https://github.com/ployground/bsdploy
(mentioned in MW Luca's Jails book)
* ansible jexec plugin : https://blog.hofstede.it/managing-freebsd-jails-with-ansible-the-jailexec-connection-plugin/
* ansible tutorial : https://eoli3n.github.io/2021/06/08/jails-part-1.html
* iocage module for Ansible : https://github.com/vbotka/ansible-iocage
* ansible tutorial : https://tudorr.ro/blog/ansible-service-in-jail/
* install ansible on freebsd : https://www.adminbyaccident.com/freebsd/how-to-freebsd/how-to-install-ansible-on-freebsd/
* gread reddit comment on this topic: https://www.reddit.com/r/freebsd/comments/ic02up/help_me_better_understand_jail_networking/
* iocage : https://iocage.readthedocs.io/en/latest/
* vnet presentation slides : https://freebsdfoundation.org/wp-content/uploads/2020/03/Jail-vnet-by-Examples.pdf
So I was thinking, sure Ansible is the "way to go"... but then I stumbled
accross DtxdF 's AppJail:
* https://github.com/DtxdF/AppJail
And then there's more potentially cool stuff that takes this from docker to
docker compose or docker swarm like functionality:
* https://github.com/DtxdF/director
* https://github.com/DtxdF/overlord/wiki
So my questions are:
* What are you using for IAC and deployment orchestration?
* What have your experiences been with Ansible|AppJail|something else?
* What would you recommend in my situation?
(I'm giving myself a month to try and fully understand this space and get my first live FreeBSD host up and running)
* Would you run all 3 environments on the same host, or is that going to give me heartache in weird ways
(e.g. database's somehow conflicting?)
Thank you in advance!