Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
polkadot-sdk
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
parity
Mirrored projects
polkadot-sdk
Commits
537c8291
Commit
537c8291
authored
4 years ago
by
gabriel klawitter
Committed by
GitHub
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
ci: add deployment of polkadot prometheus rules (#6646)
parent
74655ede
Branches
gh-readonly-queue/master/pr-5269-97fa922c85976523f755acdd104fdc77ed63dae9
Branches containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
substrate/.gitlab-ci.yml
+21
-63
21 additions, 63 deletions
substrate/.gitlab-ci.yml
with
21 additions
and
63 deletions
substrate/.gitlab-ci.yml
+
21
−
63
View file @
537c8291
...
...
@@ -27,7 +27,7 @@ stages:
-
build
-
post-build-test
-
publish
-
kubernetes
-
deploy
-
flaming-fir
variables
:
&default-vars
...
...
@@ -632,74 +632,32 @@ publish-to-crates-io:
-
cargo unleash em-dragons --no-check ${CARGO_UNLEASH_PKG_DEF}
allow_failure
:
true
.deploy-template
:
&deploy
stage
:
kubernetes
when
:
manual
deploy-kubernetes-alerting-rules
:
stage
:
deploy
interruptible
:
true
retry
:
1
image
:
paritytech/kubetools:latest
<<
:
*build-only
tags
:
# this is the runner that is used to deploy it
-
kubernetes-parity-build
before_script
:
-
test -z "${DEPLOY_TAG}" &&
test -f ./artifacts/substrate/VERSION &&
DEPLOY_TAG="$(cat ./artifacts/substrate/VERSION)"
-
test "${DEPLOY_TAG}" || ( echo "Neither DEPLOY_TAG nor VERSION information available"; exit 1 )
script
:
-
echo "Substrate version = ${DEPLOY_TAG}"
# or use helm to render the template
-
helm template
--values ./.maintain/kubernetes/values.yaml
--set image.tag=${DEPLOY_TAG}
--set validator.keys=${VALIDATOR_KEYS}
./.maintain/kubernetes | kubectl apply -f - --dry-run=false
-
echo "# substrate namespace ${KUBE_NAMESPACE}"
-
kubectl -n ${KUBE_NAMESPACE} get all
-
echo "# substrate's nodes' external ip addresses:"
-
kubectl get nodes -l node=substrate
-o jsonpath='{range .items[*]}{.metadata.name}{"\t"}{range @.status.addresses[?(@.type=="ExternalIP")]}{.address}{"\n"}{end}'
-
echo "# substrate' nodes"
-
kubectl -n ${KUBE_NAMESPACE} get pods
-o jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.spec.nodeName}{"\n"}{end}'
-
echo "# wait for the rollout to complete"
-
kubectl -n ${KUBE_NAMESPACE} rollout status statefulset/substrate
# have environment:url eventually point to the logs
.deploy-cibuild
:
&deploy-cibuild
<<
:
*deploy
needs
:
-
job
:
publish-docker-substrate
artifacts
:
false
.deploy-tag
:
&deploy-tag
<<
:
*deploy
only
:
variables
:
-
$DEPLOY_TAG
# have environment:url eventually point to the logs
deploy-ew3
:
<<
:
*deploy-cibuild
environment
:
name
:
parity-prod-ew3
deploy-ue1
:
<<
:
*deploy-cibuild
image
:
paritytech/kubetools:latest
environment
:
name
:
parity-prod-ue1
name
:
parity-mgmt-polkadot-alerting
variables
:
NAMESPACE
:
monitoring
PROMETHEUSRULE
:
prometheus-k8s-rules-polkadot-alerting
RULES
:
.maintain/monitoring/alerting-rules/alerting-rules.yaml
script
:
-
echo "deploying prometheus alerting rules"
-
kubectl -n ${NAMESPACE} patch prometheusrule ${PROMETHEUSRULE}
--type=merge --patch "$(sed 's/^/ /;1s/^/spec:\n/' ${RULES})"
only
:
refs
:
-
master
changes
:
-
"
${RULES}"
deploy-ew3-tag
:
<<
:
*deploy-tag
environment
:
name
:
parity-prod-ew3
deploy-ue1-tag
:
<<
:
*deploy-tag
environment
:
name
:
parity-prod-ue1
.validator-deploy
:
&validator-deploy
<<
:
*build-only
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment