forked from opencrvs/opencrvs-countryconfig
-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create a backup restore cron on staging #812
Merged
Merged
Changes from 3 commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
6b359b8
Create a backup restore cron on staging
euanmillar 962d849
allowed label to be passed to script for snapshot usage
euanmillar 1ae3655
Updated release action
euanmillar 19c98e6
Add approval step to production deploys
euanmillar c906757
Add Riku's username to prod deploys
euanmillar 7a30966
Merge branch 'infra-improvements' into restore-backup-cron
rikukissa 1866e76
add separate config flag for provisioning for indicating if the serve…
rikukissa 262b15d
make configuration so that qa can allow connections through the provi…
rikukissa 872e8b3
create playbook for backup servers and the connection between app ser…
rikukissa 11ae5aa
add tags
rikukissa 332928e
add tag to workflow
rikukissa 409f869
add task to ensure ssh dir exists for backup user
rikukissa 868fd31
create home directory for backup
rikukissa 4a95e99
Merge branch 'infra-improvements' into restore-backup-cron
rikukissa 4b7453b
ensure backup task is always applied for root's crontab
rikukissa 17b8580
add default value for periodic_restore_from_backup
rikukissa 36edf30
make it possible to deploy production with current infrastructure
rikukissa 3af12d8
Revert "make it possible to deploy production with current infrastruc…
rikukissa a8c172e
Merge branch 'infra-improvements' into restore-backup-cron
rikukissa 25085d8
fix wait hosts definition for migrations
rikukissa c7852c1
make production a qa environment temporarily
rikukissa 64b7f86
Merge branch 'infra-improvements' into restore-backup-cron
rikukissa cce578d
add shell for backup user so rsync works
rikukissa 8d2e0e5
Merge branch 'infra-improvements' into restore-backup-cron
rikukissa 1d44a53
explicitly define which user is the one running crontab, ensure that …
rikukissa 197d99f
ensure .ssh directory exists for crontab user
rikukissa cb4148b
get user home directories dynamically
rikukissa e1f1e72
add missing tags
rikukissa 7f0b999
add become
rikukissa 11d8431
fix file path
rikukissa d2b16fe
define backup machine in staging config as well
rikukissa 7a46e76
remove condition from fetch
rikukissa ecf0c5d
always create public key from private key
rikukissa cffa705
use hadcoded file name for public key
rikukissa 8b22ad9
fix syntax
rikukissa 1339272
make staging a QA environment so it reflects production
rikukissa 04919be
separate backup downloading and restoring to two different scripts, u…
rikukissa d2736f6
fix an issue with a running OpenHIM while we restore backup
rikukissa 9ca6a33
restart minio after restoring data
rikukissa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,10 +5,10 @@ on: | |
inputs: | ||
branch_name: | ||
description: Branch to build from | ||
default: develop | ||
default: master | ||
required: true | ||
release_version: | ||
description: Release version number | ||
description: Release tag. It will be prepended by your repository name | ||
required: true | ||
|
||
jobs: | ||
|
@@ -20,15 +20,26 @@ jobs: | |
secret: ${{ github.TOKEN }} | ||
approvers: euanmillar,rikukissa | ||
minimum-approvals: 1 | ||
issue-title: "Release: ${{ github.event.inputs.release_version }}" | ||
issue-body: "Please approve or deny the publishing of release: ${{ github.event.inputs.release_version }} to Dockerhub" | ||
issue-title: "Release: ${{ github.event.repository.name }}-${{ github.event.inputs.release_version }}" | ||
issue-body: "Please approve or deny the publishing of release: ${{ github.event.repository.name }}-${{ github.event.inputs.release_version }} to Dockerhub" | ||
exclude-workflow-initiator-as-approver: false | ||
- uses: actions/checkout@v2 | ||
if: github.event_name == 'workflow_dispatch' | ||
with: | ||
ref: '${{ github.event.inputs.branch_name }}' | ||
- uses: actions/checkout@v2 | ||
if: github.event_name == 'push' | ||
- name: Bump version and push tag | ||
id: tag_version | ||
uses: mathieudutour/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
tag_prefix: ${{ github.event.repository.name }}- | ||
custom_tag: ${{ github.event.inputs.release_version }} | ||
- name: Create a GitHub release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
tag: ${{ steps.tag_version.outputs.new_tag }} | ||
name: Release ${{ steps.tag_version.outputs.new_tag }} | ||
body: ${{ steps.tag_version.outputs.changelog }} | ||
- name: Login to DockerHub | ||
uses: docker/login-action@v1 | ||
with: | ||
|
@@ -39,6 +50,6 @@ jobs: | |
DOCKERHUB_ACCOUNT: ${{ secrets.DOCKERHUB_ACCOUNT }} | ||
DOCKERHUB_REPO: ${{ secrets.DOCKERHUB_REPO }} | ||
run: | | ||
export COUNTRY_CONFIG_VERSION=${{ github.event.inputs.release_version }} | ||
export COUNTRY_CONFIG_VERSION=${{ github.event.repository.name }}-${{ github.event.inputs.release_version }} | ||
echo "Publishing a Docker image with a tag $COUNTRY_CONFIG_VERSION" | ||
bash build-and-push.sh && unset COUNTRY_CONFIG_VERSION |
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
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Essentially country config repos are tagged like this: opencrvs-farajaland-v1.3.2