Skip to content

Instantly share code, notes, and snippets.

View oboukili's full-sized avatar
🏄‍♂️
!

Olivier Boukili oboukili

🏄‍♂️
!
View GitHub Profile
Step 25/25 : ENTRYPOINT ["/usr/local/bin/uid_entrypoint.sh"]
---> Using cache
---> 661bcff06e98
Successfully built 661bcff06e98
Successfully tagged argocd-test-tools:latest
docker tag argocd-test-tools argocd-test-tools:latest
docker run --rm -it --name argocd-test-client -u 502:20 -e HOME=/home/user -e GOPATH=/go -e ARGOCD_E2E_K3S= -e GOCACHE=/tmp/go-build-cache -e ARGOCD_LINT_GOGC=20 -v /Users/bki/go/src:/go/src:delegated -v /Users/bki/go/pkg/mod:/go/pkg/mod:delegated -v /Users/bki/.cache/go-build:/tmp/go-build-cache:delegated -v /Users/bki/.kube:/home/user/.kube:delegated -v /tmp:/tmp:delegated -w /go/src/github.com/argoproj/argo-cd argocd-test-tools:latest bash -c "make codegen-local"
go mod download
go mod vendor
export GO111MODULE=off
resource "google_container_cluster" "primary" {
name = "primary"
region = "europe-west1"
remove_default_node_pool = true
initial_node_count = 1
ip_allocation_policy {
cluster_secondary_range_name = "10.0.0.0/16"
services_secondary_range_name = "10.1.0.0/16"
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: myapp
spec:
replicas: 2
selector:
matchLabels:
app: myapp
#!/bin/sh
export VAULT_ADDR="https://active.vault.service.consul:8200"
export VAULT_PKI_PATH="v1/pki/issue/application"
# Getting a GCP JWT to authenticate against Vault GCP auth backend
JWT_TOKEN=$(curl -s -H "Metadata-Flavor: Google" 'http://metadata/computeMetadata/v1/instance/service-accounts/someserviceaccount/identity?audience=vault/apps&format=full')
# Getting a short lived Vault authentication token payload
until VAULT_TOKEN_PAYLOAD=$(curl -sfk -X POST ${VAULT_ADDR}/v1/auth/gcp/login -d "
provider "aws" {
version = "~> 1.9"
region = "eu-central-1"
}
resource "aws_kms_key" "mykey" {
description = "This key is used to encrypt bucket objects"
deletion_window_in_days = 10
}
resource "aws_s3_bucket" "mybucket" {
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
General error during class generation: Method code too large!
java.lang.RuntimeException: Method code too large!
at groovyjarjarasm.asm.MethodWriter.a(Unknown Source)
at groovyjarjarasm.asm.ClassWriter.toByteArray(Unknown Source)
at org.codehaus.groovy.control.CompilationUnit$17.call(CompilationUnit.java:827)
at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1065)
at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:603)
at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:581)
- name: Wait for elasticsearch cluster replica shards to be fully allocated for 5 minutes.
uri:
url: http://localhost:9200/_cluster/health?wait_for_no_relocating_shards=true&timeout=5s
return_content: true
register: elasticsearch_cluster_health
until: elasticsearch_cluster_health.json.status == "green"
retries: 100
when: groups['elasticsearch']|length > 1
environment:
http_proxy: ''
@oboukili
oboukili / gist:576ff970308819bc15765c8c107a6728
Created May 24, 2017 16:30
playbook + invocation + output
---
- hosts: infrastructure
become: true
pre_tasks:
- name: debug
debug:
msg: "{{ hostvars[item] }}"
with_items: "{{ groups['infrastructure'] }}"
...
## Invocation:
> $ ./dynamic-inventory.py --list
{
"infrastructure": {
"children": [
"mycloud"
]
},
"_meta": {
"hostvars": {
> $ ansible -i scaleway/scaleway-inventory.py all -m debug -a "var=hostvars[inventory_hostname]['ansible_host']"
web1 | SUCCESS => {
"changed": false,
"hostvars[inventory_hostname]['ansible_host']": "10.2.216.145"
}
database1 | SUCCESS => {
"changed": false,
"hostvars[inventory_hostname]['ansible_host']": "10.3.64.213"
}