Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add support for the Pulumi Automation API #167

Merged
merged 63 commits into from
Aug 31, 2022
Merged

Add support for the Pulumi Automation API #167

merged 63 commits into from
Aug 31, 2022

Conversation

dekobon
Copy link
Collaborator

@dekobon dekobon commented Jul 11, 2022

Proposed changes

This PR changes MARA to use the Pulumi Automation API and removes support for the bash script based project startup. By using the Automation API, we get the following benefits:

  • Pulumi launch is now controlled by Python instead of bash (the same language as the Pulumi projects)
  • Project order can be dynamically modified

The following requirements have been added:

  • A container registry is now required for all environments

This change:
Closes #125
Closes #114
Closes #101

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have written my commit messages in the Conventional Commits format.
  • I have read the CONTRIBUTING doc
  • I have added tests (when possible) that prove my fix is effective or that my feature works
  • I have checked that all unit tests pass after adding my changes
  • I have updated necessary documentation
  • I have rebased my branch onto master
  • I will ensure my PR is targeting the master branch and pulling from my branch from my own fork

dekobon and others added 30 commits May 19, 2022 11:52
This change adds Python scripts that use the Pulumi Automation
API to stand up MARA like how the bin/start.sh scripts currently
do.
This change adds a new Pulumi project named 'secrets' to
MARA. This project is used in conjuction with the Pulumi
Automation API to store secrets using the Kubernetes
secret store so the secrets can be used across Pulumi
projects.
This change outputs the results of the AWS cli command
'aws sts get-caller-identity' more tersely and without
a stacktrace when the command fails.
The naming of the property "root_path" conflicted with the
initialization parameter "path" AS WELL AS the method
"path()". This change normalizes the property names such
that they do not ambiguously overlap.
We want to be able to easily add new references to the state that
can be processed for on_success events. As such, the three variables
passed to those closures has been refactored to a single type which
references the original three variables. This will make adding new
variables easier.
When using container registry credentials with nginx ingress controller,
one must create the credential secrets for the registry in the same
namespace as the ingress controller. By breaking it apart as a separate
step, it allows us to layer in additional logic (such as adding credentials)
after the namespace has been created and before the ingress controller
has been deployed.
This change adds a new Pulumi project that gets the authentication
credentials for a Digital Ocean Container Repository, encodes them
as a Kubernetes secret, and then stores the secret in the running
cluster's nginx-ingress namespace.
AWS ECR refers to itself as a repository and not a registry, we aim
to keep that naming consistent when referring directly to ECR nouns.

This change fixes a bug where we became over-eager using the word
'registry' instead of the noun 'repository' that is hardcoded in
the ECR stack reference.
* chore: remove non-functional kubevip project

* chore: deprecation of resources as discussed in #155

(cherry picked from commit b4ff561)
* fix: typo in find command was causing pulumi stacks to not be deleted

* fix: formatting and find syntax in jenkins (esc for Groovy)

* fix: formatting and find syntax in jenkins (esc for Groovy)

* chore: clean up the comments a bit

(cherry picked from commit cf655d0)
Reference to the DO CLI is removed from the documentation
because it is installed as part of the setup_venv.sh script.
Allow for adding and merging new clusters into the
users kubectl config. The AWS and Digital Ocean
CLIs do this automatically. However, not all SDKs
nor CLI tools do this. Here we add code that does
this so that the same type of functionality can be
done no matter what the underlying infrastructure
provider is.
Add a method to allow for the insertion of a project
anywhere in the execution order of a provider.
qdzlug added 2 commits August 15, 2022 13:19
* chore: update cert-manager chart and crds

* chore: update logagent (filebeat) chart version

* chore: update nginx IC to latest chart version

* chore: update prometheus chart to latest version

* chore: update logstore (Elasticsearch) to latest chart versoin

* chore: update observability to new yaml and new chart

* chore: update example config with new values

* fix: remediation of deployment bugs

* fix: removed JWT-only logic from BoS

* fix: remove logic for sirius_host from deprecated jwt deploys

* fix: remove deprecated ingress-repo-only project

* fix: adjust min kubectl version deployed

* fix: refactor digitalocean to docean for variables

* fix: add repo-only IC deploy to support kubeconfig deploys

* fix: modifications to handle kubeconfig deploys for now

* fix: recommission bash scripts to support kubeconfig deploys for now

* fix: gitkeep needed for manifests dir under repo nginx

* chore: update jenkinsfiles for automation api

* fix: updates to the jenkinsfiles

* chore: doc updates for automation-api changes

* fix: update to docker instance for minikube jenkins
…argument / formatting (#188)

* chore: update cert-manager chart and crds

* chore: update logagent (filebeat) chart version

* chore: update nginx IC to latest chart version

* chore: update prometheus chart to latest version

* chore: update logstore (Elasticsearch) to latest chart versoin

* chore: update observability to new yaml and new chart

* chore: update example config with new values

* fix: remediation of deployment bugs

* fix: removed JWT-only logic from BoS

* fix: remove logic for sirius_host from deprecated jwt deploys

* fix: remove deprecated ingress-repo-only project

* fix: adjust min kubectl version deployed

* fix: refactor digitalocean to docean for variables

* fix: add repo-only IC deploy to support kubeconfig deploys

* fix: modifications to handle kubeconfig deploys for now

* fix: recommission bash scripts to support kubeconfig deploys for now

* fix: gitkeep needed for manifests dir under repo nginx

* chore: update jenkinsfiles for automation api

* fix: updates to the jenkinsfiles

* chore: doc updates for automation-api changes

* fix: update to docker instance for minikube jenkins

* fix: add wheel back into setup_venv.sh

* fix: jenkinsfile updates

* feat: accept stack value on CLI, handle mis-match

* chore: reformat markdown to fit standards

* fix: changes requested in #188

* refactor: break up stack environment logic into fnctions

* refactor: formatting changes to main.py

* fix: address PR comments and formatting

* refactor: formatting fixes

* fix: formatting and PR requested changes

* refactor: bash script cleanup

* chore: remove deprecated testcap script

* fix: shell isn't interpreting the args to pulumi right

* fix: still having weird globbing issues.

* fix: adjust jenkinsfiles for new runner syntax
@dekobon
Copy link
Collaborator Author

dekobon commented Aug 30, 2022

I think we are ready to merge, once the conflicts are resolved.

Jason Schmidt added 2 commits August 30, 2022 14:00
* fix: update log level and add comment to clarify print stmt

* fix: add closing braces for Linode Jenkinsfile

* fix: cosmetic fix for || construct
@qdzlug
Copy link
Contributor

qdzlug commented Aug 30, 2022

Passing in all of the development deployment modes; I am going to perform a handful of tests targeting the new automation logic and then we will merge.

Copy link
Contributor

@qdzlug qdzlug left a comment

Choose a reason for hiding this comment

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

All tests are passing, merging.

@qdzlug qdzlug merged commit 2393772 into master Aug 31, 2022
@qdzlug qdzlug deleted the automation-api branch August 31, 2022 14:20
# for free to join this conversation on GitHub. Already have an account? # to comment