Skip to content

Instantly share code, notes, and snippets.

View bizmate's full-sized avatar

Diego Gullo bizmate

View GitHub Profile
@bizmate
bizmate / gist:fa46161678857ed8f1d0d9da70a94b1c
Created November 27, 2022 05:25
please make ansible-test -> python better
I tried your suggestions but somehow the integration tests are still failing
ansible-test integration test_mysql_user --docker -vvv > test.log
Fails within docker
```
Configured locale: en_US.UTF-8
RLIMIT_NOFILE: (1024, 1048576)
Falling back to tests in "tests/integration/targets/" because "roles/test/" was not found.
WARNING: Unable to determine context for the following test targets, they will be run on the target host: test_mysql_user
@bizmate
bizmate / terraform plan
Created September 18, 2020 02:13
Terraform : Error: rpc error: code = Unavailable desc = transport is closing LOG
$ terraform plan
2020/09/18 02:55:55 [WARN] Log levels other than TRACE are currently unreliable, and are supported only for backward compatibility.
Use TF_LOG=TRACE to see Terraform's internal logs.
----
2020/09/18 02:55:55 [INFO] Terraform version: 0.13.2
2020/09/18 02:55:55 [INFO] Go runtime version: go1.14.7
2020/09/18 02:55:55 [INFO] CLI args: []string{"/usr/local/bin/terraform", "plan"}
2020/09/18 02:55:55 [DEBUG] Attempting to open CLI config file: /home/__USER__/.terraformrc
2020/09/18 02:55:55 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2020/09/18 02:55:55 [DEBUG] checking for credentials in "/home/__USER__/.terraform.d/plugins"
@bizmate
bizmate / .gitlab-ci.yml
Created September 9, 2019 11:21
docker inside docker on gitlab ci
image: diegogullo/docker-compose-dind
services:
- docker:dind
before_script:
- docker info
- docker-compose --version
- env
<?php
$ip = '35.185.31.87';
$ranges = [
'8.34.208.0/20', '8.35.192.0/21', '8.35.200.0/23', '108.59.80.0/20', '108.170.192.0/20', '108.170.208.0/21', '162.216.148.0/22', '162.222.176.0/21',
'173.255.112.0/20', '192.158.28.0/22', '199.192.112.0/22', '199.223.232.0/22', '199.223.236.0/23', '23.236.48.0/20', '23.251.128.0/19', '35.204.0.0/14',
'35.208.0.0/13', '107.167.160.0/19', '107.178.192.0/18', '146.148.2.0/23', '146.148.4.0/22', '146.148.8.0/21', '146.148.16.0/20', '146.148.32.0/19',
'146.148.64.0/18', '35.203.0.0/17', '35.203.128.0/18', '35.203.192.0/19', '35.203.240.0/20', '130.211.8.0/21', '130.211.16.0/20', '130.211.32.0/19',
'130.211.64.0/18', '130.211.128.0/17', '104.154.0.0/15', '104.196.0.0/14', '208.68.108.0/23', '35.184.0.0/14', '35.188.0.0/15', '35.216.128.0/17', '35.217.128.0/17'
@bizmate
bizmate / composer update output
Created February 6, 2018 03:41
Symfony 3 to 4
$ composer update
Loading composer repositories with package information Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Conclusion: don't install symfony/symfony 4.1.x-dev
- Conclusion: don't install symfony/symfony 4.0.x-dev
- Conclusion: don't install symfony/symfony v4.0.4
- Conclusion: don't install symfony/symfony v4.0.3
@bizmate
bizmate / AppKernel
Last active January 29, 2018 13:53
No extensions loading in re-usable bundle set up
<?php
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
use Symfony\Component\Config\Loader\LoaderInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Routing\RouteCollectionBuilder;
class AppKernel extends Kernel
TF_LOG=trace && terraform destroy -force -target=aws_instance.pivot_gocd_agent
aws_vpc.vpc_pivot_dev: Refreshing state... (ID: vpc-4ab68733)
aws_key_pair.auth: Refreshing state... (ID: terraform-diego)
aws_subnet.subnet_pivot_dev: Refreshing state... (ID: subnet-e9c91e8d)
aws_security_group.pivot_dev: Refreshing state... (ID: sg-14f7a364)
aws_instance.pivot_gocd_agent: Refreshing state... (ID: i-0c7e6381e1247acec)
aws_eip_association.eip_assoc: Destroying... (ID: eipassoc-c4186cf0)
Error applying plan:
1 error(s) occurred:
@bizmate
bizmate / main.tf
Created August 24, 2017 13:13
Getting terraform to ssh and run remote commands
provider "aws" {
access_key = "${var.aws_access_key}"
secret_key = "${var.aws_secret}"
region = "${var.region}"
}
resource "aws_key_pair" "auth" {
key_name = "${var.key_name}"
public_key = "${file(var.public_key_path)}"
}
@bizmate
bizmate / docker_dir.sh
Created July 26, 2017 18:08
docker command talk to right docker container with the right network attached
#!/usr/bin/env bash
#current root Directory is
# notice the && cd .. <- step. This goes a folder above
#CHANGED FROM DIR=`echo $( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) | rev | cut -d"/" -f1 | rev `
DIR=`echo $( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd ) | rev | cut -d"/" -f1 | rev `
# needed because of docker usage of directory names in containers name prefix
# docker SILENTLY converts it to lowercase, SILENTLY removes dashes (-), SILENTLY removes underscores (_)
DOCKER_PROJ_NAME=`echo $DIR | tr -dc '[:alnum:]\n\r' | tr '[:upper:]' '[:lower:]'`
@bizmate
bizmate / hub + chrome node
Created September 20, 2016 10:38
docker based selenium logs fails when logging in
Attaching to smoketest_web, smoketest_chrome, smoketest_phpv2, smoketest_phpv3, smoketest_npm-install, smoketest_selenium, smoketest_appcache, smoketest_data
smoketest_chrome | 02:53:22.084 INFO - Launching a Selenium Grid node
smoketest_chrome | 02:53:22.419 INFO - No port was provided in -hub. Defaulting hub port to 4444
smoketest_chrome | 02:53:25.448 INFO - Java: Oracle Corporation 25.03-b03
smoketest_chrome | 02:53:25.457 INFO - OS: Linux 3.13.0-87-generic amd64
smoketest_chrome | 02:53:25.484 INFO - v2.53.0, with Core v2.53.0. Built from revision 35ae25b
smoketest_chrome | 02:53:25.771 INFO - Driver provider org.openqa.selenium.ie.InternetExplorerDriver registration is skipped:
smoketest_chrome | registration capabilities Capabilities [{ensureCleanSession=true, browserName=internet explorer, version=, platform=WINDOWS}] does not match the current platform LINUX
smoketest_chrome | 02:53:25.774 INFO - Driver provider org.openqa.seleni