Use Consulate to export and import ACLs from Consul.
Setup your environment before you run these scripts:
export CONSUL_HOST="localhost"
export MASTER_TOKEN="myMasterToken"
Reference:
| #!/bin/bash | |
| # A script to backup GitLab repositories. | |
| GLAB_BACKUP_DIR=${GLAB_BACKUP_DIR-"gitlab_backup"} # where to place the backup files | |
| GLAB_TOKEN=${GLAB_TOKEN-"YOUR_TOKEN"} # the access token of the account | |
| GLAB_GITHOST=${GLAB_GITHOST-"gitlab.com"} # the GitLab hostname | |
| GLAB_PRUNE_OLD=${GLAB_PRUNE_OLD-true} # when `true`, old backups will be deleted | |
| GLAB_PRUNE_AFTER_N_DAYS=${GLAB_PRUNE_AFTER_N_DAYS-7} # the min age (in days) of backup files to delete | |
| GLAB_SILENT=${GLAB_SILENT-false} # when `true`, only show error messages | |
| GLAB_API=${GLAB_API-"https://gitlab.com/api/v3"} # base URI for the GitLab API |
| {# style 1 - long form #} | |
| {% if filepath == '/var/opt/tomcat_1' %} | |
| {% set tomcat_value = tomcat_1_value %} | |
| {% else %} | |
| {% set tomcat_value = tomcat_2_value %} | |
| {% endif %} | |
| {# style 2 - short form #} | |
| {% set tomcat_value = tomcat_1_value if (filepath == '/var/opt/tomcat_1') else tomcat_2_value %} |
| Kolenkin workshops: | |
| kubectl config get-contexts | |
| kubectl get rs - ревізії репліка сет | |
| kubectl get rс - ревізії репліка контроллер | |
| gcloud computre disks list | |
| ============================================================================== |
Use Consulate to export and import ACLs from Consul.
Setup your environment before you run these scripts:
export CONSUL_HOST="localhost"
export MASTER_TOKEN="myMasterToken"
Reference:
| #!/usr/bin/env python3 | |
| # coding=utf8 | |
| # | |
| # AUTHOR: Jardel Weyrich <jweyrich at gmail dot com> | |
| # | |
| from __future__ import print_function | |
| import re, sys | |
| def parse_alb_log_file(file_path): | |
| fields = [ |
| #!/bin/bash - | |
| PATH=/usr/bin | |
| ################################################## | |
| # Check Internet access through the NAT gateway. | |
| CHECK_URL="www.google.com" | |
| PROTOCOL="https://" | |
| http_response=$(curl --retry-delay 3 --retry 5 -sIf $PROTOCOL$CHECK_URL) |