Skip to content

Commit

Permalink
Script to deploy kubernetes (#1561)
Browse files Browse the repository at this point in the history
* Deploy database, backend, frontend using helm
* Remove variables that are no longer used
* Update .gitignore for host YAML files
* move docker_setup template files
* Disable Cert Manager for NUCs
* Add helm meta data for dependent charts
* Port additional maintenance scripts to Kubernetes env
* Add prompt for missing environment variables
* Defer using helm to create admin user
* Update README.md
* Set context name for kubectl config file

When installing k3s, change the name of the context in the kubectl 
config file from 'default' to the value of {{ kubecfgdir }}.  This is to 
facilitate merging of kubeconfig files to manage multiple targets.
  • Loading branch information
jmgrady authored Feb 18, 2022
1 parent cfc61c6 commit f14ace7
Show file tree
Hide file tree
Showing 197 changed files with 2,469 additions and 3,398 deletions.
10 changes: 10 additions & 0 deletions .github/actions/combine-deploy-update/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ inputs:
kube_context:
description: "Context for the kubectl commands"
required: true
update_cert_proxy:
description: "Specification for whether the combine-cert-proxy should be updated."
required: true
runs:
using: "composite"
steps:
Expand Down Expand Up @@ -37,3 +40,10 @@ runs:
set image deployment/maintenance
maintenance="${{ inputs.image_repo }}/combine_maint:${{ inputs.image_tag }}"
shell: bash
- name: Update Cert Proxy Server
if: ${{ inputs.update_cert_proxy }}
run: kubectl --context ${{ inputs.kube_context }}
--namespace combine-cert-proxy
set image deployment/combine-cert-proxy
maintenance="${{ inputs.image_repo }}/combine_maint:${{ inputs.image_tag }}"
shell: bash
1 change: 1 addition & 0 deletions .github/workflows/deploy_live.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ jobs:
image_repo: ${{ secrets.AWS_ACCOUNT }}.dkr.ecr.${{ secrets.AWS_DEFAULT_REGION }}.amazonaws.com
image_tag: ${{ needs.build.outputs.image_tag }}
kube_context: ${{ secrets.LTOPS_K8S_PRODUCTION_CONTEXT }}
update_cert_proxy: true
1 change: 1 addition & 0 deletions .github/workflows/deploy_qa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,4 @@ jobs:
image_repo: ${{ secrets.AWS_ACCOUNT }}.dkr.ecr.${{ secrets.AWS_DEFAULT_REGION }}.amazonaws.com
image_tag: ${{ needs.build.outputs.image_tag }}
kube_context: ${{ secrets.LTOPS_K8S_STAGING_CONTEXT }}
update_cert_proxy: false
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,11 @@ venv

# Kubernetes Configuration files
**/site_files/
**/charts/*.tgz

# Host file to be used for ad hoc testing/development
*.hosts.yml
*.hosts.yaml

# YAML files for ad hoc testing/development
_*.yml
Expand Down
6 changes: 6 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# These files are very large and slow to format.
src/resources/dictionaries
docs/user_guide/site

# Prettier cannot handle Helm Templates.
# See https://github.com/prettier/prettier/issues/6517
# Even when bracketSpacing is set to false, prettier will sometimes
# break the Helm templates.
**/helm/**/templates/*.yaml
16 changes: 15 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
"version": "0.2.0",
"configurations": [
{
"name": "Build All",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/deploy/scripts/build.py",
"console": "integratedTerminal"
},
{
"type": "chrome",
"request": "launch",
Expand All @@ -17,7 +24,7 @@
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/Backend/bin/Debug/net5.0/BackendFramework.dll",
"program": "${workspaceFolder}/Backend/bin/Debug/net6.0/BackendFramework.dll",
"args": [],
"cwd": "${workspaceFolder}/Backend",
"stopAtEntry": false,
Expand All @@ -43,6 +50,13 @@
"request": "attach",
"skipFiles": ["<node_internals>/**"],
"type": "pwa-node"
},
{
"name": "Python: Current File",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal"
}
]
}
Loading

0 comments on commit f14ace7

Please sign in to comment.