Skip to content

Instantly share code, notes, and snippets.

View matiasgarciaisaia's full-sized avatar
🙃
Piensa bonito

Matías García Isaía matiasgarciaisaia

🙃
Piensa bonito
View GitHub Profile
@matiasgarciaisaia
matiasgarciaisaia / README.md
Last active January 16, 2023 20:56
Change Rancher 1.6 host's rancher-agent image

When you add a new host to a Rancher 1.6 environment, Rancher's web UI gives you a sudo docker... command to run in the host. The command looks like this:

sudo docker run --rm --privileged -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/rancher:
/var/lib/rancher rancher/agent:v1.2.11 https://rancher.example.com/v1/scripts/xxxxxxxxxxxxxxxxxxxx:yyyyyyyyyyyyy:zzzzzzzzzzzzzzzzzzzzzzzzzzz

The rancher/agent:v1.2.11 image can't connect to Rancher Server's whose HTTPS connection uses a Let's Encrypt certificate (yes, that issue). So we have to change it to our custom build: manastech/rancher-v1.6-agent:v1.2.12. But, even if you can change the image in the above command - it won't do any good.

The rancher-agent connects to the server and asks for a bootstrap script located at https://rancher.example.com/v1/scripts/bootstrap, which overrides which im

diff --git a/configure.ac b/configure.ac
index 90ce91b..6ad4317 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2340,6 +2340,7 @@ AC_CHECK_FUNCS(lstat)
AC_CHECK_FUNCS(lutimes)
AC_CHECK_FUNCS(malloc_usable_size)
AC_CHECK_FUNCS(malloc_size)
+AC_CHECK_FUNCS(malloc_trim)
AC_CHECK_FUNCS(mblen)
@matiasgarciaisaia
matiasgarciaisaia / README.md
Last active April 16, 2024 20:36
How To Setup a cloud Surveda Instance

What's this?

This guide is an always-draft script approximately stating how we use to set up new Surveda instances in the InSTEDD Cloud, together with their Guisso, Verboice, Nuntium and other collaborating tools. It is not an official installation guide, but a bunch of notes that helps us set up Surveda instances - and may help you set one up, too.

There probably are implicit requirements and assumptions throughout the doc, and maybe some inaccuracies. Whenever you find any issues with the process, please submit a PR rewritting that step, or at least raise an issue.

⚠️⚠️⚠️ The guide has been moved into Surveda's main repository. Check the current version at https://github.com/instedd/surveda/blob/main/docs/cloud-instance-setup.md

@matiasgarciaisaia
matiasgarciaisaia / README.md
Last active January 23, 2019 22:41
Mati Yo's en búsqueda del commit perdido

(Podés ver una charla basada en esto en Youtube)

Problema: en Github existía un commit e31886ff58fd334a0627bd672983b6e1de83ecb7 que no podíamos fetchear pero lo veíamos (es un repo privado, vas a tener que creerme).

Github mostrando el commit perdido

$ git fetch origin e31886ff58fd334a0627bd672983b6e1de83ecb7
error: Server does not allow request for unadvertised object e31886ff58fd334a0627bd672983b6e1de83ecb7
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGhFCcuQhqmcWpkr6FpT4qHox6SOS/kjl5VNGKWR7YKS mgarcia@MatiKilmara.local
@matiasgarciaisaia
matiasgarciaisaia / gist:e612199d8112872a035d0f411821ec28
Created June 29, 2018 13:43
Crystal darwin binaries depend on clock_gettime
$ wget https://github.com/crystal-lang/crystal/releases/download/0.25.1/crystal-0.25.1-1-darwin-x86_64.tar.gz
--2018-06-29 10:41:36-- https://github.com/crystal-lang/crystal/releases/download/0.25.1/crystal-0.25.1-1-darwin-x86_64.tar.gz
Resolving github.com... 192.30.253.113, 192.30.253.112
Connecting to github.com|192.30.253.113|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github-production-release-asset-2e65be.s3.amazonaws.com/6887813/aca38504-7afd-11e8-87de-4b37674c1349?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20180629%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20180629T134136Z&X-Amz-Expires=300&X-Amz-Signature=dae047911eb28fb825539a7d027d5ebb455a468a598cfb47aa886215b8407aac&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Dcrystal-0.25.1-1-darwin-x86_64.tar.gz&response-content-type=application%2Foctet-stream [following]
--2018-06-29 10:41:36-- https://github-production-release-asset-2e65be
@matiasgarciaisaia
matiasgarciaisaia / kernel-info.log
Created June 6, 2018 14:55
Docker 17.12 won't start on Centos 7.5 without upgrading the kernel
[root@localhost ~]# cat /etc/*-release
CentOS Linux release 7.5.1804 (Core)
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
@matiasgarciaisaia
matiasgarciaisaia / gist:00a135073b2bfe18a49d9386207aaa3b
Last active January 4, 2018 20:58
ActiveMonitoring Broker error (see comments for more info)
1/4/2018 5:44:45 PMwarning: variable "deps" does not exist and is being expanded to "deps()", please use parentheses to remove the ambiguity or change the variable name
1/4/2018 5:44:45 PM /app/deps/coherence/mix.exs:15
1/4/2018 5:44:45 PM
1/4/2018 5:44:45 PMwarning: variable "package" does not exist and is being expanded to "package()", please use parentheses to remove the ambiguity or change the variable name
1/4/2018 5:44:45 PM /app/deps/coherence/mix.exs:16
1/4/2018 5:44:45 PM
1/4/2018 5:44:45 PM
1/4/2018 5:44:45 PM20:44:45.887 [info] Already up
1/4/2018 5:44:46 PMwarning: variable "deps" does not exist and is being expanded to "deps()", please use parentheses to remove the ambiguity or change the variable name
1/4/2018 5:44:46 PM /app/deps/coherence/mix.exs:15
@matiasgarciaisaia
matiasgarciaisaia / omnibus-output.txt
Created August 17, 2017 19:43
Building Crystal with LLVM 4.0.1 in Debian 7 x64
[Builder: crystal] I | 2017-08-17T17:52:01+00:00 | Environment:
[Builder: crystal] I | 2017-08-17T17:52:01+00:00 | CFLAGS="-I/opt/crystal/embedded/include -O2 -fPIC"
[Builder: crystal] I | 2017-08-17T17:52:01+00:00 | CPPFLAGS="-I/opt/crystal/embedded/include -O2 -fPIC"
[Builder: crystal] I | 2017-08-17T17:52:01+00:00 | CRYSTAL_PATH="/var/cache/omnibus/src/crystal/src"
[Builder: crystal] I | 2017-08-17T17:52:01+00:00 | CXXFLAGS="-I/opt/crystal/embedded/include -O2 -fPIC"
[Builder: crystal] I | 2017-08-17T17:52:01+00:00 | LDFLAGS="-Wl,-rpath,/opt/crystal/embedded/lib -L/opt/crystal/embedded/lib"
[Builder: crystal] I | 2017-08-17T17:52:01+00:00 | LD_RUN_PATH="/opt/crystal/embedded/lib"
[Builder: crystal] I | 2017-08-17T17:52:01+00:00 | LIBRARY_PATH="/opt/crystal/embedded/lib"
[Builder: crystal] I | 2017-08-17T17:52:01+00:00 | PATH="/var/cache/omnibus/src/llvm_bin/llvm-4.0.1-1/bin:/var/cache/omnibus/src/crystal/deps:/opt/crystal/bin:/o
@matiasgarciaisaia
matiasgarciaisaia / build-log.txt
Last active May 9, 2017 18:04
`bundle omnibus build llvm` with LLVM 3.8 fails health check due to libLTO.so depending on libtinfo.so.5
$ bundle exec omnibus build llvm
[CLI] I | 2017-05-09T17:31:54+00:00 | Using config from 'omnibus.rb'
Building llvm ...
[Software: llvm] I | 2017-05-09T17:31:54+00:00 | Resolving manifest entry for llvm
[Licensing] W | 2017-05-09T17:31:55+00:00 | Project 'llvm' does not contain licensing information.
[Licensing] W | 2017-05-09T17:31:55+00:00 | Software 'llvm' does not contain licensing information.
[Software: llvm] I | 2017-05-09T17:31:55+00:00 | Could not restore from cache
[NetFetcher: llvm] I | 2017-05-09T17:31:55+00:00 | Cleaning project directory `/var/cache/omnibus/src/llvm'
[NetFetcher: llvm] I | 2017-05-09T17:31:55+00:00 | Extracting `/var/cache/omnibus/cache/llvm-3.8.1.src.tar.xz' to `/var/cache/omnibus/src/llvm'
[Builder: llvm] I | 2017-05-09T17:31:57+00:00 | Starting build