Skip to content
This repository has been archived by the owner on Feb 24, 2021. It is now read-only.

feat(security): Remove Vault dependency on Consul #350

Merged

Conversation

jim-wang-intel
Copy link
Contributor

@jim-wang-intel jim-wang-intel commented Nov 18, 2020

With the Vault's backend storage been changed to filesystem instead of Consul, will no longer depend on in the compose file.

This together with edgex-go's change and edgex-consul's vault healthy check removal shall close the issue edgexfoundry/edgex-go#2882 .

Signed-off-by: Jim Wang yutsung.jim.wang@intel.com

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

If your build fails due to your commit message not passing the build checks, please review the guidelines here: https://github.com/edgexfoundry/developer-scripts/blob/master/.github/Contributing.md.

What is the current behavior?

Vault depends on Consul

Issue Number:

Fixes edgexfoundry/edgex-go#2882

What is the new behavior?

Vault will not depend on Consul directly

Does this PR introduce a breaking change?

  • Yes
  • No

Specific Instructions

Are there any specific instructions or things that should be known prior to reviewing?

Note: For this compose up working correctly, it requires the following two PRs merged into master first:

  1. feat(security): Remove Vault dependency on Consul by using file backend edgex-go#2886
  2. feat(security): Remove Vault's healthy check in Consul docker-edgex-consul#40

Other information

If tested locally, do the following steps:

  1. Clone the code from feat(security): Remove Vault dependency on Consul by using file backend edgex-go#2886
  2. Build the latest docker images for edgex-go: make docker
  3. Clone the code from feat(security): Remove Vault's healthy check in Consul docker-edgex-consul#40
  4. Build the latest edgex-core-consul docker image: make docker
  5. Go to compose-builder sub-directory and do make gen dev to generate the local version of docker-compose.yml to run
  6. Modify the edgex-core-consul docker image in the generated docker-compose file to point to the local built docker image above:
    image: edgexfoundry/docker-edgex-consul:0.0.0
  7. In the command-line, run docker-compose up and all services should started up ok (can be checked and see using docker ps and individual docker logs via portainer). Also it should be ok in the docker logs edgex-core-consul

@jim-wang-intel jim-wang-intel added enhancement New feature or request 3-high priority denoting release-blocking issues security-services ireland labels Nov 18, 2020
@jim-wang-intel jim-wang-intel self-assigned this Nov 18, 2020
bnevis-i
bnevis-i previously approved these changes Nov 18, 2020
Copy link
Member

@lenny-goodell lenny-goodell left a comment

Choose a reason for hiding this comment

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

You need to run make build so this change is propagated to the generated compose files.
Make sure to use docker-compose version 1.27.2 since newer versions have bug that generated depends_on section incorrectly that results in our TAF tests failing.

Also move PR to draft until ADR is approved.

@lenny-goodell lenny-goodell marked this pull request as draft November 19, 2020 23:20
@jim-wang-intel
Copy link
Contributor Author

jim-wang-intel commented Nov 20, 2020

You need to run make build so this change is propagated to the generated compose files.

good catch. thanks!

Make sure to use docker-compose version 1.27.2 since newer versions have bug that generated depends_on section incorrectly that results in our TAF tests failing.

ok, good to know.

Also move PR to draft until ADR is approved.

sure.

@lenny-goodell
Copy link
Member

@jim-wang-intel , This change breaks the TAF smoke tests. Likely because the TAF scripts expect the consul line to be their when run sed. Please verify by running the initial TAF scripts against your PR. These are the scripts in https://github.com/edgexfoundry/edgex-taf/tree/master/TAF/utils/scripts/docker that pull and modify the compose file. Specifically run get-compose-file.sh with it pulling from your branch and verify the resulting compose file is valid syntactically. Likely will require a PR to adjust the TAF script...

@lenny-goodell
Copy link
Member

recheck

lenny-goodell
lenny-goodell previously approved these changes Nov 30, 2020
Copy link
Member

@lenny-goodell lenny-goodell left a comment

Choose a reason for hiding this comment

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

LGTM

@lenny-goodell
Copy link
Member

@cherrycl , can you look at the TAF smoke test failures on this PR? The PR just removes consul from Vault depends_on. THX!

@lenny-goodell lenny-goodell marked this pull request as ready for review November 30, 2020 20:57
@cherrycl
Copy link

cherrycl commented Dec 1, 2020

recheck

@cherrycl
Copy link

cherrycl commented Dec 1, 2020

@lenny-intel The smoke test #61 failure for this PR, because we changed the scripts to use Hanoi release build. We reverted the change after adding tag. Now it works fine.

@lenny-goodell
Copy link
Member

Now it works fine.

Thanks!

bnevis-i
bnevis-i previously approved these changes Dec 1, 2020
@lenny-goodell
Copy link
Member

Waiting on edgexfoundry/edgex-go#2886 before merge

  With the Vault's backend storage been changed to filesystem instead of Consul,  will any longer depend on  in the compose file.
  This together with edgex-go's change and edgex-consul's vault healthy check removal shall close the issue edgexfoundary/edgex-go/#2882 .

Signed-off-by: Jim Wang <yutsung.jim.wang@intel.com>
Signed-off-by: Jim Wang <yutsung.jim.wang@intel.com>
@lenny-goodell lenny-goodell merged commit e758309 into edgexfoundry:master Dec 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
3-high priority denoting release-blocking issues enhancement New feature or request ireland security-services
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove Vault dependency on Consul
4 participants