-
Notifications
You must be signed in to change notification settings - Fork 149
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split out Firewall / Nexus / Gitea (#1365)
* WIP: doesn't work yet * Make temporary changes to the makefile * Fixes to firewall submodule * Update Makefile * move firewall name to locals * Init porter bundles for Gitea and Nexus * Add parameters to the new porter bundles * Revert "Convert data inputs into variable inputs for modules in Terraform (#1154)" This reverts commit c3e2cb7. * WIP: moving variables around for Gitea * Update Gitea module to consume variables from data * Fix several problems in firewall module * Changes to Gitea terraform (fix state container, add az login for local-exec) * Initial Nexus porter configuration * Add Sonatype-Nexus bundle * Uncomment firewall lock, fix local-exec command * Fix comments * fmt * Gitea, Nexus: Move variable inputs to data and locals * change path to nexus.properties * temporarily remove arm_client_id * fmt * remove unused arguments * fmt * Use key_vault_reference_identity_id in Terraform * Remove unused variables * Deploy Firewall, Gitea and Nexus as part of the main build * Add deploying of shared services to tre-deploy command * Add uninstall back * WIP: working transfer of state for Firewall * WIP: fiddling with more states * WIP: fix removal of terraform state * Add import script for Gitea * fixup tre-start/stop make target naming * strip '-' from string in storage account name * removed state_remove for gitea + nexus * removed state_remove for gitea + nexus * local modifications of import/remove state scripts * fw / gitea / nexus deploy from local via tf functional * gitignore * bumped gitea version * tf linting * PR updates * vars for ci * added check_dependencies to login in CI * check for non-existing RG and skipping import state if we're in a fresh CI * removed lock from remove/import scripts * remove/import state for gitea * gitea and nexus state moved * nexus + gitea state moved, apart from storage share * fixed storage import * PR snags * override * kv uri * new secret import style * secret * secret * state list * state list * remove state fix * remove state special chars * importing random_password to prevent KV updating * moved make target out of default path * supress risky log output * unwound gitea/nexus state moving debacle Co-authored-by: Tanya Borisova <[email protected]> Co-authored-by: Ross Smith <[email protected]> Co-authored-by: Stuart Leeks <[email protected]>
- Loading branch information
1 parent
c2742f6
commit ce3ddb9
Showing
45 changed files
with
846 additions
and
169 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/bash | ||
|
||
# This script exists to support the migration from the firewall into a shared service bundle, that can be deployed from a dev workstation. | ||
|
||
set -e | ||
|
||
PLAN_FILE="tfplan$$" | ||
LOG_FILE="tmp$$.log" | ||
|
||
LOC="$(dirname -- "$(readlink -f "${BASH_SOURCE}")")" | ||
|
||
${LOC}/../../devops/scripts/terraform_wrapper.sh \ | ||
-g $TF_VAR_mgmt_resource_group_name \ | ||
-s $TF_VAR_mgmt_storage_account_name \ | ||
-n $TF_VAR_terraform_state_container_name \ | ||
-k ${TRE_ID}-${SHARED_SERVICE_KEY} \ | ||
-l ${LOG_FILE} \ | ||
-c "terraform plan -out ${PLAN_FILE} && \ | ||
terraform apply -input=false -auto-approve ${PLAN_FILE} && \ | ||
terraform output -json > ../tre_output.json" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# See https://docs.docker.com/engine/reference/builder/#dockerignore-file | ||
# Put files here that you don't want copied into your bundle's invocation image | ||
.gitignore | ||
Dockerfile.tmpl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.cnab/ | ||
.terraform* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
FROM debian:stretch-slim | ||
|
||
ARG BUNDLE_DIR | ||
|
||
RUN apt-get update && apt-get install -y ca-certificates | ||
|
||
# Install Azure CLI (neeeded for import_state.sh) | ||
RUN apt-get update \ | ||
&& apt-get install -y ca-certificates jq curl apt-transport-https lsb-release gnupg \ | ||
&& curl -sL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | tee /etc/apt/trusted.gpg.d/microsoft.gpg > /dev/null \ | ||
&& AZ_REPO=$(lsb_release -cs) \ | ||
&& echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $AZ_REPO main" | tee /etc/apt/sources.list.d/azure-cli.list \ | ||
&& apt-get update && apt-get -y install azure-cli | ||
|
||
# To be able to use `az network firewall` commands | ||
RUN az config set extension.use_dynamic_install=yes_without_prompt | ||
|
||
# This is a template Dockerfile for the bundle's invocation image | ||
# You can customize it to use different base images, install tools and copy configuration files. | ||
# | ||
# Porter will use it as a template and append lines to it for the mixins | ||
# and to set the CMD appropriately for the CNAB specification. | ||
# | ||
# Add the following line to porter.yaml to instruct Porter to use this template | ||
# dockerfile: Dockerfile.tmpl | ||
|
||
# You can control where the mixin's Dockerfile lines are inserted into this file by moving "# PORTER_MIXINS" line | ||
# another location in this file. If you remove that line, the mixins generated content is appended to this file. | ||
# PORTER_MIXINS | ||
|
||
# Use the BUNDLE_DIR build argument to copy files into the bundle | ||
COPY . $BUNDLE_DIR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"schemaVersion": "1.0.0-DRAFT+b6c701f", | ||
"name": "azure", | ||
"created": "2021-06-03T11:31:05.7314113Z", | ||
"modified": "2021-06-03T11:31:05.7314113Z", | ||
"credentials": [ | ||
{ | ||
"name": "azure_client_id", | ||
"source": { | ||
"env": "ARM_CLIENT_ID" | ||
} | ||
}, | ||
{ | ||
"name": "azure_client_secret", | ||
"source": { | ||
"env": "ARM_CLIENT_SECRET" | ||
} | ||
}, | ||
{ | ||
"name": "azure_subscription_id", | ||
"source": { | ||
"env": "ARM_SUBSCRIPTION_ID" | ||
} | ||
}, | ||
{ | ||
"name": "azure_tenant_id", | ||
"source": { | ||
"env": "ARM_TENANT_ID" | ||
} | ||
} | ||
] | ||
} |
Oops, something went wrong.