hashicorp/terraform-aws-nomad

[IMPROVEMENT] Upgrade Amazon Linux Support to Version 2

MatthiasScholz opened this issue · 6 comments

AWS update there Amazon Linux to a new version 2: https://aws.amazon.com/de/amazon-linux-2/

Interesting Features:

  • systemd
  • on-premise support ( Docker, ... )

Outlook:
The support of systemd would facilitate the setup and configuration of Nomad and Consul, as well.
Supervisor would not be needed anymore to streamline setup, since Debian and Ubuntu are using systemd as well.

Question:
Should the Amazon Linux 1 support be dropped?

  1. Pro: Legacy support
  2. Contra: Duplication of many configuration files, especially for the AMI creation.
  3. Contra: Increased complexity in the install-nomad and run-nomad script.

Suggestion:
Drop support since the provided setup can only be seen as an example.

Note:
Once this is decided, I can provide a PR.

I think it does make sense to switch to Amazon Linux 2, use systemd, and drop support for Amazon Linux 1. That said, I believe the version of Amazon Linux 2 out now is an LTS candidate, so perhaps it's worth waiting for the official LTS to come out?

Current version is: Amazon Linux 2 LTS Candidate (2017.12) ( 2018-02-04 ).
I agree it might be better to wait for the official release before turning Amazon Linux 1 off. Currently no release date is announced.

What do you think about dropping the usage of supervisord to configure the Nomad and Consul services running on the nodes? Since systemd will basically be a general approach supported by many linux distributions, it could facilitate the handling.

Yup, once the official LTS comes out, it makes sense to switch to systemd across the board: Consul, Nomad, Vault.

Until the release will be there I will keep this feature branch updated:

No longer works with Amazon Linux 2. The install-nomad script needlessly expects pip to be installed, which isn't, so as to install supervisor. Simply removing sudo pip install supervisor from install-nomad and running the following did it for us:

sudo amazon-linux-extras install epel
sudo yum -y install supervisor

We have switched our other repos from supservisor to systemd. See this PR for an example. Anyone up for a PR to update this repo too?