This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Allow for introspection of topolologies in flights | |
""" | |
from jujuctl.db import get_db | |
from jujuctl.env import get_env | |
def list_topologies(options): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tosca_definitions_version: tosca_simple_1.0.0 | |
description: > | |
TOSCA simple profile with node.js, mongodb,... | |
inputs: | |
capability_types: | |
tosca.capabilities.MongoEndpoint: | |
derived_from: tosca.capabilities.DatabaseEndpoint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
compute/api.py: instance['uuid'] = str(uuid.uuid4()) | |
compute/manager.py: token = str(uuid.uuid4()) | |
compute/manager.py: token = str(uuid.uuid4()) | |
compute/manager.py: token = str(uuid.uuid4()) | |
context.py: return 'req-' + str(uuid.uuid4()) | |
db/sqlalchemy/api.py: values['uuid'] = str(uuid.uuid4()) | |
db/sqlalchemy/api.py: network_ref['uuid'] = str(uuid.uuid4()) | |
db/sqlalchemy/api.py: str(uuid.uuid4()), | |
network/manager.py: vif.uuid = str(uuid.uuid4()) | |
openstack/common/context.py: return 'req-%s' % str(uuid.uuid4()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Placement | |
--------- | |
Deployer supports flexible per unit placement policies. A unit placement policy allows for | |
specifying which machine a unit is placed on, including allowing multiple units to be deployed | |
to the same machine. | |
This is expressed in deployer config via the ‘to’ list parameter on a service. Each unit that | |
needs placement must have its placement specified individually else the default behavior is used, | |
per the service’s constraints. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
api for unit agent request shutdown on self machine (triggered by hook exit value) | |
api for unit agent to watch for shutdown on machine | |
-> on receipt | |
stops further hook exec / blocking on the current one if any | |
signals ready for shutdown | |
api for unit agent to signal ready for shutdown | |
api for machine agent watch for shutdown | |
-> on shutdown recieved | |
-> disables unit deployment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Capture all the deps | |
mkdir dist-cache | |
pip install -d dist-cache -r requirements.txt | |
cd .. | |
tar czvf mypackage-archive.tgz | |
# Transfer that to a new machine | |
# On the separate machine in a virtualenv | |
# Extract tarball and use |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import argparse | |
import sys | |
import logging | |
from boto.ec2 import regions, connect_to_region | |
def main(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo apt-get install python-virtualenv | |
virtualenv tosca-dev | |
source tosca-dev/bin/activate | |
git clone https://github.com/stackforge/heat-translator.git | |
# Edit access | |
git clone git@github.com:juju/juju-tosca.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
""" | |
Simple usage to log into a container via ssh | |
$ lxc-host -s -n container_name | |
Simple usage to query the addresses of a container | |
$ lxc-host -n container_name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kube: | |
series: trusty | |
services: | |
kubernetes-master: | |
charm: kubernetes-master | |
flannel: | |
charm: flannel | |
num_units: 2 | |
options: | |
container_type: docker |
OlderNewer