Skip to content

Instantly share code, notes, and snippets.

View marcoceppi's full-sized avatar
.

Marco Ceppi marcoceppi

.
View GitHub Profile
@marcoceppi
marcoceppi / looking.py
Last active August 29, 2015 13:55 — forked from lazypower/looking.py
def validate_database_relationship():
#Connect to the sentrys and fetch the transmitted details
sent_config = d.sentry.unit['mysql/0'].relation('db', 'owncloud:db')
#Connect to owncloud's sentry and read the configuration PHP file
prod_config = d.sentry.unit['owncloud/0'].file_contents('/var/www/owncloud/config/config.php')
cfg_to_check = {'dbuser': 'user', 'dbpass': 'password', 'dbhost': 'host'}
for cfg_file_key, juju_cfg_key in cfg_to_check.items():
#Search the return string of the config for the transmit values
if prod_config.find("'%s' => '%s'" % (cfg_file_key, sent_config[juju_cfg_key]) == -1:
#!/bin/bash
set -e
JUJU_ENV=$1
if [ ! "$JUJU_ENV" ]; then
echo "Please run juju cleanup <environment>"
exit 1
fi
#!/bin/bash
RELEASES="precise quantal saucy trusty"
for release in $RELEASES; do
backportpackage -u ppa:juju/stable -r -d $release -S ~ppa1 -y $1
done

Testing Juju Charms with Vagrant

Notes:

Place the vagrant file in your $CHARM_DIR root. This may move at a later date, but for internal testing, just put it there and stop fighting me on this.

Also fetch the supporting juju-vagrant-setup.sh script - this is the driver behind the vagrant automation until we find a better process to execute the code. Embedding bash inline in a yaml file is supported: but the yaml parser chokes if you have #'s inline. It interprets the rest of the line as a comment regardless of scope. end. of. story.

Instructions on Use:

sudo sh -e ~/Downloads/crouton -t unity -r saucy -n su
sudo enter-chroot -n su
# When inside the chroot
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install ubuntu-desktop
# Exit the chroot, Ctrl+D
sudo startunity -b # Launch unity and background the req
from setuptools import setup
install_requires = [
'requests',
'charmworldlib',
'PyYAML'
]
tests_require = [
'coverage',

Keybase proof

I hereby claim:

  • I am marcoceppi on github.
  • I am marcoceppi (https://keybase.io/marcoceppi) on keybase.
  • I have a public key whose fingerprint is BFA5 83B4 6E72 67C6 1BF9 3F51 2D2E 26A0 359C 0C06

To claim this, I am signing this object:

Hi everyone, I'm going to jump right in with this email be briefly describing a short summary of the issues people have brought up around the review process and the review queue, then outline what my proposal to fix this is, outline the new process for feedback prior to implementation, finally listing actions left to implement this.

Issues

One of the biggest feedback we've gotten from users lays along the lines of "where is my charm in the review process and what are next actions". Currently, the review queue doesn't illuminate any next actions for a user. As queue times increase this can leave a poor user experience. Another feedback point we have seen recently are reviews being lost in the process. This is arguably the primary reason behind a revamp of the review queue and review process to ensure a submitted item for review does not get lost in the process. These are two primary examples, while a more exhaustive list exists these items have the most impact for users contributing to the ecosystem.

So

#!/usr/bin/python
import argparse
import subprocess
from amulet.helpers import juju
def get_parser(params=None):
parser = argparse.ArgumentParser(description='Juju run with relation contexts')
parser.add_argument('-r', '--relation',
#!/bin/bash
relids=`juju-run "relation-ids <peer-relation-name>"`
for i in "$relids"; do
units=`juju-run "relation-list $i"
for unit in "$units"; do
juju-run "relation-set -r $i key=val key1=val $unit"
done
done