Skip to content

Instantly share code, notes, and snippets.

View allthingsclowd's full-sized avatar
🎲
42

Graham Land allthingsclowd

🎲
42
View GitHub Profile
@allthingsclowd
allthingsclowd / Fujitsu-K5-Example-Heat-Stack-Project1.YAML
Last active October 10, 2016 20:41
Fujitsu K5 Example Heat Stack
heat_template_version: 2013-05-23
# Author: Graham Land
# Date: 25/09/2016
# Purpose: Project 1 Demo HOT Infrastructure Template
# Twitter: @allthingsclowd
# Blog : https://allthingscloud.eu
description: K5 template to build an environment within a Project
# Input parameters
@allthingsclowd
allthingsclowd / K5_Project2.yml
Last active October 10, 2016 20:41
K5 Project2 Example Stack
heat_template_version: 2013-05-23
# Author: Graham Land
# Purpose: Demo Project 2 with Inter-Project-Routing
# Date: 25/09/2016
# Twitter: @allthingsclowd
# Blog : https://allthingscloud.eu
description: Fujitsu K5 demo heat template to build an environment within a Project
# Input parameters
# Author : Graham Land
# Date: 03/10/2016
#
# Purpose: Simple python 2.7 script to demonstrate how to use the Fujitsu K5 IaaS API
# The script creates a security group in a project
#
# blog: https://allthingscloud.eu
# twitter: @allthingsclowd
import requests
#!/usr/bin/python
adminUser = 'username'
adminPassword = 'password'
contract = 'contract_name'
contractid = 'contract_id'
defaultid = 'default_project_id'
project = 'working_project'
region = 'uk-1'
#!/usr/bin/python
# Author : Graham Land
# Date: 08/10/2016
#
# Purpose: Upload a custom image to K5 Object Storage and then register with K5 Glance
# If the image is greater than 1GB it will be broken down into 1GB chunks
# and then uploaded
# Command line parameters -
# -i image_path
# -c container_name
#!/usr/bin/python
# Author : Graham Land
# Date: 08/10/2016
#
# Purpose: Share a custom image from the default project to a member project in K5
# Command line parameters -
# -i image_id
# -p member_project
#
# Prerequisites: k5contractsettings.py file in the same directory with login details
heat_template_version: 2013-05-23
# Author: Graham Land
# Date: 13/10/2016
# Purpose: Simple template to demonstrate the basic format/usage of HOT stacks on our K5 platform
description: Demo K5 template to build a private network, subnet, and instance with a global ip address - router and external network are prerequisites
# Input parameters
parameters:
image:
@allthingsclowd
allthingsclowd / K5NetworkConnectorDemo.yml
Created October 21, 2016 19:18
Fujitsu K5 IaaS OpenStack Heat Template
heat_template_version: 2013-05-23
# Author: Graham Land
# Date: 21/10/2016
# Purpose: Create two subnets, one in each availability zone, within the same project and then join these subnets
# using a network connector. The subnets also get configured with the new routes.
#
# Twitter: @allthingsclowd
# Blog: https://allthingscloud.eu
# Input parameters
parameters:
centos_image:
type: string
label: Image name or ID
description: Image to be used for compute instance
default: "CentOS 7.2 64bit (English) 01"
flavor_S2:
type: string
label: Flavor
# Create a private network in availability zone 1
private_net_az1:
type: OS::Neutron::Net
properties:
availability_zone: { get_param: az1 }
name: "private_net_az1"
# Create a new subnet on the private network
private_subnet_az1:
type: OS::Neutron::Subnet