Skip to content

Instantly share code, notes, and snippets.

View jriguera's full-sized avatar

José Riguera Lopez jriguera

View GitHub Profile
@jriguera
jriguera / list-dockerhub-images.sh
Last active April 12, 2017 11:53
Listing Docker images in DockerHub
#!/bin/bash
# Based on kizbitz/dockerhub-v2-api-organization.sh at https://gist.github.com/kizbitz/175be06d0fbbb39bc9bfa6c0cb0d4721
# Example for the Docker Hub V2 API
# Returns all images and tags associated with a Docker Hub organization account.
# Requires 'jq': https://stedolan.github.io/jq/
# set username, password, and organization
UNAME=""
UPASS=""
@jriguera
jriguera / 00-openvpn-bittorrent.txt
Last active February 4, 2018 09:39
Split routing for bittorrent in Arch
By doing these steps, transmission will be listening only on the VPN interface/network.
As debian/ubuntu are now using systemd, the following instructions should work on those distros.
1) Copy all shell scripts to /usr/local/bin/ and make them executable
2) Copy systemd service unit to /etc/systemd/system/
3) Install transmission: sudo pacman -Syu transmission-cli
4) Install openvpn: sudo pacman -Syu openvpn
5) Change transmission parameters: sudo vim /var/lib/transmission/.config/transmission-daemon/settings.json
6) Create the openvpn client configuration file: /etc/openvpn/client.conf
7) Enable the new service: sudo systemctl enable openvpn-bittorrent
@jriguera
jriguera / new_tenant.sh
Created November 17, 2015 15:23
Openstack CLI commands to create a new Project/Tenant and networks using identity V3 (with groups)
# Now we are managing the users on a project by using groups. So everything
# is about creating users and add they to the groups.
# A special user is created always with the same name of the project,
# just to reserve the name and avoid confusion and have an email.
############## Define those variables for the tenant (this is just an example)
TENANT=test
PASSWORD=test
TENANT_DESC="Test"
@jriguera
jriguera / openstack_cli_ironic.sh
Last active March 16, 2018 22:56
Example how to deploy a baremetal server using ironic standalone
#!/bin/bash
# Create the initial ramdkisk
export ELEMENTS_PATH="/home/jriguera/diskimage-builder/elements"
ramdisk-image-create ubuntu deploy-ironic grub-install -o my-deploy-ramdisk
# Create the image to deploy on disk (with ConfigDrive support)
DIB_CLOUD_INIT_DATASOURCES="ConfigDrive, OpenStack" disk-image-create ubuntu baremetal dhcp-all-interfaces -o my-image
# Define the parameter for the new server
@jriguera
jriguera / segurity_group_rules.sh
Created February 24, 2016 22:52
Neutron cmd to add security group rules
# Add Neutron security groups for ping and ssh
neutron security-group-rule-create \
--protocol icmp \
--direction ingress \
--remote-ip-prefix 0.0.0.0/0 \
default
neutron security-group-rule-create \
--protocol tcp \
@jriguera
jriguera / 00_openstack_vmware.md
Last active February 5, 2019 13:52
OpenStack and VMware integration
@jriguera
jriguera / openvpn-new-client.sh
Created March 9, 2015 01:00
Create a new openvpn client
#!/bin/bash
# Create client for OpenVPN using easy-rsa
# create p12 certificate
PREFIX=lu
BASE_DIR="/etc/openvpn"
DEST_DIR="$BASE_DIR/clients"
EASY_DIR="$BASE_DIR/easy-rsa"
if [ "$#" -ne 1 ]; then
@jriguera
jriguera / compile_ncid.sh
Last active May 30, 2020 22:36
NCID on raspberry pi (arch linux)
# Install compile requirements
pacman -S gcc make
# Install lib requirements for ncid
pacman -S libpcap
# Download
curl http://heanet.dl.sourceforge.net/project/ncid/ncid/1.2/ncid-1.2-src.tar.gz -o ncid-1.2-src.tar.gz
# Compile
@jriguera
jriguera / app_instance_identity_intro_to_envoy.md
Created September 21, 2020 08:25 — forked from nikhilsuvarna/app_instance_identity_intro_to_envoy.md
Application Instance Identity and Intro to Envoy in PCF
@jriguera
jriguera / delete-dockerhub-images.sh
Last active May 26, 2022 05:27
Delete Docker images on DockerHub
#!/bin/bash
# Based on kizbitz/dockerhub-v2-api-organization.sh at https://gist.github.com/kizbitz/175be06d0fbbb39bc9bfa6c0cb0d4721
# Example for the Docker Hub V2 API
# Returns all images and tags associated with a Docker Hub organization account.
# Requires 'jq': https://stedolan.github.io/jq/
# set username, password, and organization
UNAME=""
UPASS=""