Skip to content

Instantly share code, notes, and snippets.

View ualmtorres's full-sized avatar

Manolo Torres ualmtorres

  • Universidad de Almería
  • Almería, Spain
View GitHub Profile
[DEFAULT]
username=cloud-user
groups=Administradores
inject_user_password=true
config_drive_raw_hhd=true
config_drive_cdrom=true
config_drive_vfat=true
bsdtar_path=C:\Program Files\Cloudbase Solutions\Cloudbase-Init\bin\bsdtar.exe
mtools_path=C:\Program Files\Cloudbase Solutions\Cloudbase-Init\bin\
verbose=true
@ualmtorres
ualmtorres / index.php
Created June 2, 2018 10:40
Script to show customer list in Sporting Goods database
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Web PHP-MySQL con Docker</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB" crossorigin="anonymous">
</head>
<body>
<div class = "container">
@ualmtorres
ualmtorres / init.sql
Created June 2, 2018 10:47
SQL script to initialize the Sporting Goods database with a s_customer table
CREATE SCHEMA IF NOT EXISTS SG;
USE SG;
DROP TABLE IF EXISTS s_customer;
CREATE TABLE s_customer
(id VARCHAR(3) NOT NULL,
name VARCHAR(20) NOT NULL,
phone VARCHAR(20) NOT NULL,
address VARCHAR(20),
city VARCHAR(20),
@ualmtorres
ualmtorres / docker.sh
Last active April 19, 2022 07:14
Script de instalación de Docker CE en Ubuntu
#!/bin/bash
echo "Instalando Docker"
apt-get update
apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
heat_template_version: 2016-04-08
description: >
Sample Lab template.
This template creates two OpenStack instances. The first one is aprovisioned with Docker. The second one is aprovisoned with nginx. The post-installation script assumes that an Ubuntu image is selected.
parameters:
key_name:
type: string
description: Name of a KeyPair to enable SSH access to the instance
@ualmtorres
ualmtorres / hosts.cfg
Last active December 14, 2018 05:23
Setup a new OpenStack Project with a new user, network and watchers
# Inventory hosts.cfg file
[controller]
10.0.0.2
@ualmtorres
ualmtorres / openstack-basic-infrasctucture.yaml
Last active January 24, 2019 13:03
Heat template to build OpenStack basic infrastructure
heat_template_version: 2016-04-08
description: >
OpenStack Sample template.
This template creates virtual infrastructure for OpenStack instances. The basic infrastructure constists of two networks (management-net and tunnel-net) and three nodes: controller, networks and one compute node.
parameter_groups:
- label: Grupo de parámetros
description: Grupo de parámetros
parameters:
@ualmtorres
ualmtorres / openstack-set-password-for-instances.sh
Last active April 4, 2020 19:59
Post install script to enable login to OpenStack instances using password
#cloud-config
password: changeThisPassword
chpasswd: { expire: False }
ssh_pwauth: True
@ualmtorres
ualmtorres / openstack-ansible.sh
Created April 8, 2019 12:12
Post install script to install Ansible on OpenStack instances
#!/bin/bash
echo "Install Python"
apt-get update
apt-get install -y python-minimal
echo "Install Ansible"
apt-get install -y software-properties-common
apt-add-repository --yes --update ppa:ansible/ansible
apt-get install -y ansible
@ualmtorres
ualmtorres / openstack-python.sh
Created April 8, 2019 12:13
Post install script to install Python 2.7 on OpenStack instances
#!/bin/bash
echo "Install Python"
apt-get update
apt-get install -y python-minimal