theme | transition | highlightTheme | logoImg | slideNumber | title |
---|---|---|---|---|---|
night |
slide |
monokai |
logo.png |
false |
VSCode Reveal intro |
::: block
#!/bin/bash | |
curl -O https://bootstrap.pypa.io/get-pip.py | |
python3 get-pip.py --user | |
echo "export PATH=~/.local/bin:$PATH" > ~/.bash_profile | |
source ~/.bash_profile | |
pip3 install awscli --upgrade --user |
#!/bin/bash | |
for user in $(aws iam list-users --query 'Users[*].UserName' --output text); do | |
echo $user; | |
echo "======================"; | |
aws iam list-access-keys --user $user --query "AccessKeyMetadata[].AccessKeyId" --output text | |
done |
theme | transition | highlightTheme | logoImg | slideNumber | title |
---|---|---|---|---|---|
night |
slide |
monokai |
logo.png |
false |
VSCode Reveal intro |
::: block
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v1-node16 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: |
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "AllowUserToSeeBucketListInTheConsole", | |
"Action": [ | |
"s3:ListAllMyBuckets", | |
"s3:GetBucketLocation" | |
], | |
"Effect": "Allow", |
__timestamp(){ | |
date "+%Y%m%dT%H%M%S" | |
} | |
__log(){ | |
log_level="$1" | |
message="$2" | |
echo '{}' | \ | |
jq --monochrome-output \ | |
--compact-output \ | |
--raw-output \ |
(Assuming a Debian 8-like system)
Install prometheus-node-exporter
$ sudo apt update && sudo apt install prometheus-node-exporter
Configure prometheus-node-exporter
to expose metrics only to localhost
, not on to all networks. Modify file /etc/default/prometheus-node-exporter
:
# Set the command-line arguments to pass to the server.
- run: | |
name: Launch pipeline | |
command: | | |
curl --location --request POST 'https://circleci.com/api/v2/project/(vcs)/(org)/(project)/pipeline' \ | |
--header 'Content-Type: application/json' \ | |
-u "${CIRCLE_CI_API_TOKEN}:" |
yq e ".appVersion = \"${FINAL_BUILD_REF_SLUG}-${FINAL_COMMIT_SHORT_SHA}\"" -i ./your-local-chart/Chart.yaml | |
helm upgrade your-deployment ./your-local-chart --install --set image.tag=${FINAL_BUILD_REF_SLUG} --namespace yournamespace --create-namespace | |
kubectl rollout restart deployment your-deployment --namespace yournamespace |
- MR_BRANCH_LAST_COMMIT_SHA=$( | |
curl -s \ | |
--header "PRIVATE-TOKEN: $CI_PRIVATE_TOKEN" \ | |
"$CI_API_V4_URL/projects/$CI_PROJECT_ID/repository/commits/$CI_COMMIT_SHA" |\ | |
jq -r '.parent_ids | del(.[] | select(. == "'$CI_COMMIT_BEFORE_SHA'")) | .[-1]' | |
) | |
- MR_BRANCH_NAME=$( | |
curl -s \ | |
--header "PRIVATE-TOKEN: $CI_PRIVATE_TOKEN" \ | |
"$CI_API_V4_URL/projects/$CI_PROJECT_ID/repository/commits/$MR_BRANCH_LAST_COMMIT_SHA/merge_requests" |\ |