Skip to content

Instantly share code, notes, and snippets.

@francescor
francescor / gist:6b0e9483cd5e3e35c8eca8cee1d1c1cd
Last active August 6, 2023 09:43
Prepare Ubuntu 22.04 Cloud Image and Template for Proxmox
# HOW to clone and provision an Ubuntu VM with cloud-init in Proxmox
#
# Adapted from https://gist.github.com/reluce/797515dc8b906eb07f54393a119df9a7
# See also https://pve.proxmox.com/wiki/Cloud-Init_Support
# All commands will be executed on a Proxmox host
# Innstall virt-customize
apt update
apt install libguestfs-tools
@francescor
francescor / az_list_vmss_instances
Last active April 30, 2023 08:07
List public IP and fqdn of all Azure instances belonging to a Virtual machine scale set (aka vmss) with easy ssh command to login
#! /bin/bash
# List instances of an Azure vmss
# List public IP and fqdn of all Azure instances belonging to
# a Virtual machine scale set (aka vmss) with easy ssh command to login
# Gits at https://gist.github.com/francescor/aaf2bdff5ef57f92799f4e123681af2a
ResourceGroup="myRG"
VmssName="myVMSS"
# adapt with your username
# Mount volume EBS che ospita, in modo permanente, /etc/letsencrypt
# vedi https://www.karelbemelmans.com/2016/11/ec2-userdata-script-that-waits-for-volumes-to-be-properly-attached-before-proceeding/
VOLUME_DEVICE=$1
MOUNT_DIR=$2
VOLUME_ID=$3
AWS_REGION=$4
EC2_INSTANCE_ID=$(curl -s http://instance-data/latest/meta-data/instance-id)
# https://docs.aws.amazon.com/cli/latest/reference/ec2/attach-volume.html
aws ec2 attach-volume --device $VOLUME_DEVICE --instance-id $EC2_INSTANCE_ID --volume-id $VOLUME_ID --region $AWS_REGION
######################################################################
@francescor
francescor / Vagrantfile
Last active October 16, 2015 05:11 — forked from GMaissa/Vagrantfile
Initialize an eZ Publish demo environment using Ansible and Vagrant
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# Debian test box
config.vm.box = "puphpet/debian75-x64"