Skip to content
This repository was archived by the owner on Oct 8, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 31 commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
ec3e69c
chore: update cert-manager chart and crds
Aug 1, 2022
90880d9
chore: update logagent (filebeat) chart version
Aug 1, 2022
0b0a57e
chore: update nginx IC to latest chart version
Aug 1, 2022
32c8080
chore: update prometheus chart to latest version
Aug 1, 2022
cf5cacd
chore: update logstore (Elasticsearch) to latest chart versoin
Aug 1, 2022
8c05f3f
chore: update observability to new yaml and new chart
Aug 1, 2022
b03aba9
chore: update example config with new values
Aug 1, 2022
0ac8f42
fix: remediation of deployment bugs
Aug 2, 2022
a66539e
fix: removed JWT-only logic from BoS
Aug 3, 2022
be5ad7e
fix: remove logic for sirius_host from deprecated jwt deploys
Aug 3, 2022
b74831b
fix: remove deprecated ingress-repo-only project
Aug 3, 2022
58020d4
fix: adjust min kubectl version deployed
Aug 3, 2022
426e5bd
Merge branch 'nginxinc:automation-api' into automation-api
qdzlug Aug 4, 2022
83ecfea
fix: refactor digitalocean to docean for variables
Aug 4, 2022
491e138
Merge branch 'nginxinc:automation-api' into automation-api
qdzlug Aug 4, 2022
f3fb05b
fix: add repo-only IC deploy to support kubeconfig deploys
Aug 8, 2022
16581f1
fix: modifications to handle kubeconfig deploys for now
Aug 8, 2022
0ea0a2b
fix: recommission bash scripts to support kubeconfig deploys for now
Aug 8, 2022
887ef22
fix: gitkeep needed for manifests dir under repo nginx
Aug 8, 2022
1a1dfde
chore: update jenkinsfiles for automation api
Aug 8, 2022
990ee2f
Merge remote-tracking branch 'origin/automation-api' into automation-api
Aug 8, 2022
f004373
fix: updates to the jenkinsfiles
Aug 10, 2022
eca884d
chore: doc updates for automation-api changes
qdzlug Aug 12, 2022
bce74ab
fix: update to docker instance for minikube jenkins
Aug 15, 2022
8adfef0
Merge remote-tracking branch 'qdzlug/automation-api' into automation-api
Aug 15, 2022
7b0d84f
Merge branch 'nginxinc:automation-api' into automation-api
qdzlug Aug 15, 2022
2ea5e07
fix: add wheel back into setup_venv.sh
qdzlug Aug 16, 2022
02f9883
Merge remote-tracking branch 'qdzlug/automation-api' into automation-api
Aug 17, 2022
72fcf08
fix: jenkinsfile updates
Aug 17, 2022
5d278d0
feat: accept stack value on CLI, handle mis-match
qdzlug Aug 18, 2022
38de917
Merge remote-tracking branch 'origin/automation-api' into automation-api
qdzlug Aug 18, 2022
1f29757
chore: reformat markdown to fit standards
Aug 24, 2022
49b68f4
fix: changes requested in #188
Aug 24, 2022
ab2b111
refactor: break up stack environment logic into fnctions
Aug 26, 2022
0ccaef8
refactor: formatting changes to main.py
Aug 26, 2022
a12ec78
fix: address PR comments and formatting
Aug 26, 2022
b2db07e
refactor: formatting fixes
Aug 26, 2022
a0ccc1b
fix: formatting and PR requested changes
Aug 26, 2022
8ae3f8c
refactor: bash script cleanup
Aug 26, 2022
f62cbee
chore: remove deprecated testcap script
Aug 26, 2022
44b9693
fix: shell isn't interpreting the args to pulumi right
Aug 26, 2022
f0d0806
fix: still having weird globbing issues.
Aug 26, 2022
ccb9d8f
fix: adjust jenkinsfiles for new runner syntax
Aug 26, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions extras/jenkins/MicroK8s/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,11 @@ pipeline {
$WORKSPACE/pulumi/python/venv/bin/pulumi config set kubernetes:cluster_name "microk8s-cluster" -C pulumi/python/config -s marajenkmk8s${BUILD_NUMBER}
$WORKSPACE/pulumi/python/venv/bin/pulumi config set kubernetes:infra_type "kubeconfig" -C pulumi/python/config -s marajenkmk8s${BUILD_NUMBER}
$WORKSPACE/pulumi/python/venv/bin/pulumi config set kubernetes:kubeconfig "$HOME/.kube/config" -C pulumi/python/config -s marajenkmk8s${BUILD_NUMBER}
$WORKSPACE/pulumi/python/venv/bin/pulumi config set prometheus:adminpass "Zf4dabEA" --secret -C pulumi/python/kubernetes/secrets -s marajenkmk8s${BUILD_NUMBER}
$WORKSPACE/pulumi/python/venv/bin/pulumi config set sirius:accounts_pwd "Zf4dabEA" --secret -C pulumi/python/kubernetes/secrets -s marajenkmk8s${BUILD_NUMBER}
$WORKSPACE/pulumi/python/venv/bin/pulumi config set prometheus:adminpass "${MARA_PASSWORD}" --secret -C pulumi/python/kubernetes/secrets -s marajenkmk8s${BUILD_NUMBER}
$WORKSPACE/pulumi/python/venv/bin/pulumi config set sirius:accounts_pwd "${MARA_PASSWORD}" --secret -C pulumi/python/kubernetes/secrets -s marajenkmk8s${BUILD_NUMBER}
$WORKSPACE/pulumi/python/venv/bin/pulumi config set sirius:demo_login_pwd "password" --secret -C pulumi/python/kubernetes/secrets -s marajenkmk8s${BUILD_NUMBER}
$WORKSPACE/pulumi/python/venv/bin/pulumi config set sirius:demo_login_user "testuser" --secret -C pulumi/python/kubernetes/secrets -s marajenkmk8s${BUILD_NUMBER}
$WORKSPACE/pulumi/python/venv/bin/pulumi config set sirius:ledger_pwd "Zf4dabEA" --secret -C pulumi/python/kubernetes/secrets -s marajenkmk8s${BUILD_NUMBER}
$WORKSPACE/pulumi/python/venv/bin/pulumi config set sirius:ledger_pwd "${MARA_PASSWORD}" --secret -C pulumi/python/kubernetes/secrets -s marajenkmk8s${BUILD_NUMBER}
'''
}
}
Expand Down
4 changes: 2 additions & 2 deletions extras/jenkins/Minikube/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ pipeline {
curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 && chmod +x minikube
mkdir -p /usr/local/bin/
install minikube /usr/local/bin/
minikube start --vm-driver=docker --force --cpus 4 --memory 30000
minikube start --vm-driver=docker --force --cpus 4 --memory 30000 --kubernetes-version=v1.23.9
'''
}
}
Expand Down Expand Up @@ -164,7 +164,7 @@ _EOF_
$WORKSPACE/pulumi/python/venv/bin/pulumi config set logagent:helm_timeout "600" -C pulumi/python/config -s marajenkmkube${BUILD_NUMBER}
$WORKSPACE/pulumi/python/venv/bin/pulumi config set logstore:helm_timeout "600" -C pulumi/python/config -s marajenkmkube${BUILD_NUMBER}
$WORKSPACE/pulumi/python/venv/bin/pulumi config set prometheus:helm_timeout "600" -C pulumi/python/config -s marajenkmkube${BUILD_NUMBER}
$WORKSPACE/pulumi/python/venv/bin/pulumi config set kic-helm:fqdn "marajenkmkube${BUILD_NUMBER}.zathras.io" -C pulumi/python/config -s marajenkmkmkube${BUILD_NUMBER}
$WORKSPACE/pulumi/python/venv/bin/pulumi config set kic-helm:fqdn "marajenkmkube${BUILD_NUMBER}.zathras.io" -C pulumi/python/config -s marajenkmkube${BUILD_NUMBER}
$WORKSPACE/pulumi/python/venv/bin/pulumi config set kubernetes:cluster_name "microk8s-cluster" -C pulumi/python/config -s marajenkmkube${BUILD_NUMBER}
$WORKSPACE/pulumi/python/venv/bin/pulumi config set kubernetes:infra_type "kubeconfig" -C pulumi/python/config -s marajenkmkube${BUILD_NUMBER}
$WORKSPACE/pulumi/python/venv/bin/pulumi config set kubernetes:kubeconfig "$HOME/.kube/config" -C pulumi/python/config -s marajenkmkube${BUILD_NUMBER}
Expand Down
56 changes: 45 additions & 11 deletions pulumi/python/automation/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ def usage():
-d, --debug Enable debug output on all of the commands executed
-b, --banner-type= Banner type to indicate which project is being executed (e.g. {', '.join(BANNER_TYPES)})
-h, --help Prints help information
-s, --stack Specifies the Pulumi stack to use
-p, --provider= Specifies the provider used (e.g. {', '.join(PROVIDERS)})

OPERATIONS:
Expand All @@ -98,15 +99,16 @@ def main():
"""Entrypoint to application"""

try:
shortopts = 'hdp:b:' # single character options available
longopts = ["help", 'debug', 'banner-type', 'provider='] # long form options
shortopts = 'hds:p:b:' # single character options available
longopts = ["help", 'debug', 'banner-type', 'stack=','provider='] # long form options
opts, args = getopt.getopt(sys.argv[1:], shortopts, longopts)
except getopt.GetoptError as err:
RUNNER_LOG.error(err)
usage()
sys.exit(2)

provider_name: Optional[str] = None
stack_name: Optional[str] = None

global debug_on

Expand All @@ -118,6 +120,9 @@ def main():
elif opt in ('-p', '--provider'):
if value.lower() != 'none':
provider_name = value.lower()
elif opt in ('-s', '--stack'):
if value.lower() != 'none':
stack_name = value.lower()
elif opt in ('-d', '--debug'):
debug_on = True
elif opt in ('-b', '--banner-type'):
Expand Down Expand Up @@ -162,6 +167,11 @@ def main():
provider = provider_instance(provider_name.lower())
RUNNER_LOG.debug('Using [%s] infrastructure provider', provider.infra_type())

# Now validate the stack name
if not stack_name or stack_name.strip() == '':
RUNNER_LOG.error('No Pulumi stack specified - Pulumi stack is a required argument')
sys.exit(2)

# We execute the operation requested - different operations have different pre-requirements, so they are matched
# differently. Like show-execution does not require reading the configuration files, so we just look for a match
# for it right away, and if matched, we run and exit.
Expand All @@ -170,19 +180,43 @@ def main():
provider.display_execution_order(output=sys.stdout)
sys.exit(0)

# For the other operations, we need the configuration files parsed, so we do the parsing upfront.

# We parse the environment file up front in order to have the necessary values required by this program.
# The logic around the PULUMI_STACK accounts for three scenarios:
#
# 1. If there is no environment file, the argument given on the CLI is used and added to the environment file.
# 2. If there is a difference between the CLI and the environment file, the environment file value is used.
# 3. If there is an environment file with no PULUMI_STACK, the environment file is appended with the argument.
try:
env_config = env_config_parser.read()
except FileNotFoundError as e:
msg = 'Environment configuration file not found. This file must exist at the path: %s'
RUNNER_LOG.error(msg, e.filename)
sys.exit(2)

if env_config.stack_name():
stack_config = read_stack_config(provider=provider, env_config=env_config)
msg = 'Environment configuration file not found. Creating new file at the path: %s'
# If we do not have an environment file, we create one and add the pulumi_stack
with open(e.filename, 'w') as f:
print("PULUMI_STACK=" + stack_name, file=f)
RUNNER_LOG.error(msg, e.filename)
try:
env_config = env_config_parser.read()
stack_config = read_stack_config(provider=provider, env_config=env_config)
except:
RUNNER_LOG.error("Unable to build configuration file")
sys.exit(2)
else:
stack_config = None
if env_config.stack_name():
if env_config.stack_name() != stack_name:
msg = 'Stack %s given on CLI but Stack %s is in env file; using env file value '
RUNNER_LOG.error(msg, env_config.stack_name(), stack_name)
stack_config = read_stack_config(provider=provider, env_config=env_config)
else:
msg = 'Environment configuration file does not contain PULUMI_STACK, adding'
with open(e.filename, 'a') as f:
print("PULUMI_STACK=" + stack_name, file=f)
RUNNER_LOG.error(msg, e.filename)
try:
env_config = env_config_parser.read()
stack_config = read_stack_config(provider=provider, env_config=env_config)
except:
RUNNER_LOG.error("Unable to append to configuration file")
sys.exit(2)

validate_with_verbosity = operation == 'validate' or debug_on
try:
Expand Down