This file contains hidden or 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
| > cidrsubnet("172.16.0.0/12", 4, 2) | |
| 172.18.0.0/16 | |
| > cidrsubnet("10.1.2.0/24", 4, 15) | |
| 10.1.2.240/28 | |
| > cidrsubnet("fd00:fd12:3456:7890::/56", 16, 162) | |
| fd00:fd12:3456:7800:a200::/72 |
This file contains hidden or 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
| # Data source for state file | |
| data "terraform_remote_state" "state" { | |
| backend = "local" | |
| } | |
| # Data source for google subnetwork | |
| data "google_compute_network" "subnetworks" { | |
| project = "${var.project}" | |
| name = "${var.name}" |
This file contains hidden or 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
| 1) Download and install awless : | |
| # https://github.com/wallix/awless/releases/download/v0.1.11/awless-windows-amd64.zip | |
| 2) Configure aws cli | |
| #aws configure | |
| you need to add AWS_ACCESS_KEY and AWS_SECRET_KEY |
This file contains hidden or 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
| #!/usr/bin/env bash | |
| ## Print usage | |
| usage () { | |
| echo "Usage: <script_name> <yaml_file_path> <doc_number> <key> <value>" | |
| echo """ | |
| Description: | |
| script_name: Name of you scirpt file | |
| yaml_file_path: YAML file location path | |
| doc_number: Number of doc in multipline doc file. Deafult is 0 |
This file contains hidden or 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
| #!/usr/bin/env bash | |
| ## Print usage | |
| usage () { | |
| echo "Usage: <script_name> <project_id> <src_gcr_url> <src_image_name_tag> <dest_gcr_url> <dest_image_name_tag>" | |
| echo """ | |
| Description: | |
| project_id: Project ID for GCR repo | |
| src_gcr_url: Source GCR URL e.g gcr.io, asia.gcr.io | |
| src_image_name_tag: Source image name and tag to pull e.g python:2.7.0 |
This file contains hidden or 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
| # ArangoDB configuration file | |
| # | |
| # Documentation: | |
| # https://docs.arangodb.com/latest/Manual/Administration/Configuration/ | |
| # | |
| [database] | |
| directory = /var/lib/arangodb3 | |
| # maximal-journal-size = 33554432 |
This file contains hidden or 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
| # ArangoDB configuration file | |
| # | |
| # Documentation: | |
| # https://docs.arangodb.com/latest/Manual/Administration/Configuration/ | |
| #https://gist.github.com/normanuber/9472203fea5a6254db994e70e20b02d0 | |
| [database] | |
| directory = /var/lib/arangodb3 | |
| # maximal-journal-size = 33554432 |
This file contains hidden or 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
| # ArangoDB configuration file | |
| # | |
| # Documentation: | |
| # https://docs.arangodb.com/latest/Manual/Administration/Configuration/ | |
| # | |
| [database] | |
| directory = /var/lib/arangodb3 | |
| # maximal-journal-size = 33554432 |
This file contains hidden or 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
| Import-Module AWSPowerShell | |
| Set-ExecutionPolicy RemoteSigned | |
| Initialize-AWSDefaults | |
| $config=New-Object Amazon.S3.AmazonS3Config | |
| $config.RegionEndpoint=[Amazon.RegionEndpoint]::"ap-southeast-1" | |
| $config.ServiceURL = "https://ap-southeast-1.amazonaws.com/" | |
| $BucketName = "" | |
| $Now = Get-Date |
This file contains hidden or 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
| FROM ubuntu:16.04 | |
| # replace shell with bash so we can source files | |
| RUN rm /bin/sh && ln -s /bin/bash /bin/sh | |
| # update the repository sources list | |
| # and install dependencies | |
| RUN apt-get update \ | |
| && apt-get install -y curl git python make g++ \ | |
| && apt-get -y autoclean |