Skip to content
This repository has been archived by the owner on Jan 25, 2023. It is now read-only.

Switch from supervisord to systemd #142

Merged
merged 5 commits into from
Apr 3, 2019
Merged

Conversation

edtan
Copy link
Contributor

@edtan edtan commented Mar 27, 2019

Closes #73 by switching to Amazon Linux 2 and changing to systemd.

The vault.service configuration was based off of the configuration listed at the Vault Deployment Guide.

Also, I've updated README.md to indicate that its been updated to Amazon Linux 2, but there is a link to the latest public AMIs. That list will need to be updated with new Amazon Linux 2 AMIs if this PR is accepted.

I've also updated one of the examples to also install pip as it's still required by the terraform-aws-consul modules to install supervisord. I'm looking into updating those modules to use systemd as well, so will remove the reference to pip once I have an PR in for those modules.

update: I submitted hashicorp/terraform-aws-consul#130, but it seems like pip and boto3 is needed for the auth signing script example. Thus, I've updated the PR to install them on Amazon Linux 2 as it seems like they're not already included.

@hashicorp-cla
Copy link

hashicorp-cla commented Mar 27, 2019

CLA assistant check
All committers have signed the CLA.

@edtan edtan force-pushed the systemd branch 2 times, most recently from d6021a8 to bf79aa9 Compare March 28, 2019 03:06
@Etiene
Copy link
Contributor

Etiene commented Mar 28, 2019

Thanks for the PR! Im going to run the test suite

Copy link
Collaborator

@brikis98 brikis98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fantastic, thank you! Let's hope the tests that @Etiene just kicked off pass :)

examples/vault-auto-unseal/README.md Outdated Show resolved Hide resolved
examples/vault-consul-ami/vault-consul.json Outdated Show resolved Hide resolved
modules/run-vault/run-vault Show resolved Hide resolved
- Use [[ ]] and ==
- Add documentation about systemd/journalctl for logs and new
systemd-stdout/systemd-stderr options
@edtan
Copy link
Contributor Author

edtan commented Mar 28, 2019

I've made the suggested changes, and also removed the creation of the /opt/vault/log folder in install-vault.

@Etiene
Copy link
Contributor

Etiene commented Mar 28, 2019

Tests are failing to fetch logs (test/vault_helpers.go:134), I'll try to have a look at that, but let me know if you have any insights

@edtan
Copy link
Contributor Author

edtan commented Mar 28, 2019

It might be because I removed /opt/vault/log in install-vault. I'll get the tests set up on my machine this week and can look into it further.

@Etiene
Copy link
Contributor

Etiene commented Mar 28, 2019

Ok, thanks! This error was already happening before the last commit though. It's probably linked to the stdout and stderr path not being updated on tests on test/vault_helpers.go:44

@edtan
Copy link
Contributor Author

edtan commented Mar 28, 2019

Oh I see, thanks! Since the logs are using journalctl now, I'll look into updating the tests to look there instead.

@edtan
Copy link
Contributor Author

edtan commented Mar 30, 2019

I've updated the tests so that it writes out the Vault logs to a file. I ran the TestVaultPrivateCluster example locally and it passed for both the Ubuntu and Amazon Linux 2 images. Note that the same logs are in the syslogs, but it might be more convenient for debugging purposes to still have the separate Vault logs.

@brikis98
Copy link
Collaborator

brikis98 commented Apr 1, 2019

@Etiene Could you take over getting this PR passing tests and merged from here?

Copy link
Contributor

@Etiene Etiene left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! all tests are passing now. Great PR! 👍

@Etiene Etiene merged commit df75973 into hashicorp:master Apr 3, 2019
@edtan edtan deleted the systemd branch April 3, 2019 15:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use systemd instead of supervisord
4 participants