Let's build a Deis cluster in Google's Compute Engine!
Get a few Google things squared away so we can provison VM instances.
angular.module('myMdl', []).config(['$httpProvider', function($httpProvider) { | |
$httpProvider.responseInterceptors.push([ | |
'$q', '$templateCache', 'activeProfile', | |
function($q, $templateCache, activeProfile) { | |
// Keep track which HTML templates have already been modified. | |
var modifiedTemplates = {}; | |
// Tests if there are any keep/omit attributes. | |
var HAS_FLAGS_EXP = /data-(keep|omit)/; |
/** | |
* Example of using an angular provider to build an api service. | |
* @author Jeremy Elbourn ([email protected]) | |
*/ | |
/** Namespace for the application. */ | |
var app = {}; | |
/******************************************************************************/ |
- name: Create activation scripts for the specified Python virtual environments | |
template: | |
src: virtualenv_postactivate.j2 | |
dest: "{{ python_virtualenv_home_dir }}/{{ item.environment.name }}/bin/postactivate" | |
sudo: yes | |
sudo_user: "{{ python_user }}" | |
with_items: python_virtualenvs_variables | |
when: > | |
python_virtualenv_install and python_virtualenvs|length > 0 and | |
python_virtualenvs_variables and python_virtualenvs_variables|length > 0 |
--- | |
python_major_minor_version: '3.4' | |
python_major_minor_patch_version: '3.4.3' | |
python_compressed_source_md5sum: '7d092d1bba6e17f0d9bd21b49e441dd5' | |
python_virtualenvs: | |
- name: 'virtualenv1' | |
requirements: '/app/virtualenv1_requirements.txt' | |
- name: 'virtualenv2' | |
requirements: '/app/virtualenv2_requirements.txt' |
#!/bin/sh | |
{% for k, v in item.environment.iteritems() if k != 'name' %} | |
export {{ k.upper() }}="{{ v }}" | |
{% endfor %} | |
echo "##################################" | |
echo "Completed activation of {{ item.environment.name }}." |
#!/bin/sh | |
{% for k, v in item.environment.iteritems() if k != 'name' %} | |
unset {{ k.upper() }} | |
{% endfor %} | |
echo "##################################" | |
echo "Completed deactivation of {{ item.environment.name }}." |
[uwsgi] | |
name = apadmin | |
chdir = /app/apadmin | |
home = /etc/python/virtual-envs/ap_admin | |
module = apadmin.wsgi:application | |
processes = 1 | |
socket = /tmp/ap_admin.sock' |
server { | |
listen 80; | |
server_name localhost; | |
location / { | |
include uwsgi_params; | |
uwsgi_pass unix:/tmp/ap_admin.sock; | |
} | |
location /favicon.ico { |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.