Permalink
Browse files

bye bye Puppet

  • Loading branch information...
gasman committed May 14, 2012
1 parent 95e04f5 commit 368b3a681e086d337f835ccbec7f95ace3584192
View
@@ -1,3 +1,2 @@
.vagrant
-etc/puppet/manifests/pip-log.txt
settings/local.py
View
@@ -24,12 +24,12 @@ build scripts for getting from lucid32 to django-base are bundled in this projec
To start a new project, run the following commands (from the place where you would usually create projects - not within
the vagrant-django-template checkout), changing /path/to/vagrant-django-template and myproject as appropriate:
- django-admin.py startproject --template /path/to/vagrant-django-template --name=Vagrantfile,machine.pp myproject
+ django-admin.py startproject --template /path/to/vagrant-django-template --name=Vagrantfile myproject
cd myproject
vagrant up
vagrant ssh
(then, within the SSH session:)
./manage.py runserver 0.0.0.0:8000
This will make the app accessible on the host machine as http://localhost:8111/ . The codebase is located on the host
-machine, exported to the VM as a shared folder; code editing and Git operations will generally be done on the host.
+machine, exported to the VM as a shared folder; code editing and Git operations will generally be done on the host.
@@ -1,53 +0,0 @@
-$project_name = "{{ project_name }}"
-
-$database_name = $project_name
-$virtualenv_name = $project_name
-
-$project_dir = "/home/vagrant/$project_name"
-$virtualenv_dir = "/home/vagrant/.virtualenvs/$project_name"
-
-# http://groups.google.com/group/vagrant-up/browse_thread/thread/0fbd824efcce973f
-group { "puppet":
- ensure => "present",
-}
-
-# http://groups.google.com/group/puppet-users/browse_thread/thread/c60e8ae314ae687b
-Exec {
- path => ["/bin", "/sbin", "/usr/bin", "/usr/sbin"],
-}
-
-# Ensure apt-get update has been run before installing any packages
-# http://mig5.net/node/347 , http://johnleach.co.uk/words/771/puppet-dependencies-and-run-stages
-exec { "apt-update":
- command => "/usr/bin/apt-get update"
-}
-Exec["apt-update"] -> Package <| |>
-
-include python2
-include postgresql::server
-
-class {'environment':
- virtualenv_name => $virtualenv_name
-}
-
-class {'virtualenv':
- virtualenv_name => $virtualenv_name,
- project_dir => $project_dir,
-}
-
-postgresql::database { $database_name:
- owner => "postgres",
-}
-
-exec {'pip-install-requirements':
- command => "pip install -E $virtualenv_dir -r $project_dir/requirements.txt",
- user => vagrant,
- path => "/usr/local/bin:/usr/bin:/bin",
- require => Class["python2"],
-}
-
-exec {'django-db-setup':
- command => "/bin/bash -c 'source $virtualenv_dir/bin/activate && cd $project_dir && ./manage.py syncdb --noinput && ./manage.py migrate'",
- user => vagrant,
- require => [ Exec["pip-install-requirements"], Postgresql::Database[$database_name] ],
-}
@@ -1,10 +0,0 @@
-class environment ($virtualenv_name) {
- file { "bashrc":
- path => "/home/vagrant/.bashrc",
- ensure => present,
- owner => vagrant,
- group => vagrant,
- mode => 755,
- content => template('environment/bashrc.erb')
- }
-}
@@ -1,104 +0,0 @@
-# ~/.bashrc: executed by bash(1) for non-login shells.
-# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
-# for examples
-
-# If not running interactively, don't do anything
-[ -z "$PS1" ] && return
-
-# don't put duplicate lines in the history. See bash(1) for more options
-# ... or force ignoredups and ignorespace
-HISTCONTROL=ignoredups:ignorespace
-
-# append to the history file, don't overwrite it
-shopt -s histappend
-
-# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
-HISTSIZE=1000
-HISTFILESIZE=2000
-
-# check the window size after each command and, if necessary,
-# update the values of LINES and COLUMNS.
-shopt -s checkwinsize
-
-# make less more friendly for non-text input files, see lesspipe(1)
-[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
-
-# set variable identifying the chroot you work in (used in the prompt below)
-if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
- debian_chroot=$(cat /etc/debian_chroot)
-fi
-
-# set a fancy prompt (non-color, unless we know we "want" color)
-case "$TERM" in
- xterm-color) color_prompt=yes;;
-esac
-
-# uncomment for a colored prompt, if the terminal has the capability; turned
-# off by default to not distract the user: the focus in a terminal window
-# should be on the output of commands, not on the prompt
-#force_color_prompt=yes
-
-if [ -n "$force_color_prompt" ]; then
- if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
- # We have color support; assume it's compliant with Ecma-48
- # (ISO/IEC-6429). (Lack of such support is extremely rare, and such
- # a case would tend to support setf rather than setaf.)
- color_prompt=yes
- else
- color_prompt=
- fi
-fi
-
-if [ "$color_prompt" = yes ]; then
- PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
-else
- PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
-fi
-unset color_prompt force_color_prompt
-
-# If this is an xterm set the title to user@host:dir
-case "$TERM" in
-xterm*|rxvt*)
- PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
- ;;
-*)
- ;;
-esac
-
-# enable color support of ls and also add handy aliases
-if [ -x /usr/bin/dircolors ]; then
- test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
- alias ls='ls --color=auto'
- #alias dir='dir --color=auto'
- #alias vdir='vdir --color=auto'
-
- alias grep='grep --color=auto'
- alias fgrep='fgrep --color=auto'
- alias egrep='egrep --color=auto'
-fi
-
-# some more ls aliases
-alias ll='ls -alF'
-alias la='ls -A'
-alias l='ls -CF'
-
-# Alias definitions.
-# You may want to put all your additions into a separate file like
-# ~/.bash_aliases, instead of adding them here directly.
-# See /usr/share/doc/bash-doc/examples in the bash-doc package.
-
-if [ -f ~/.bash_aliases ]; then
- . ~/.bash_aliases
-fi
-
-# enable programmable completion features (you don't need to enable
-# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
-# sources /etc/bash.bashrc).
-if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
- . /etc/bash_completion
-fi
-
-export WORKON_HOME=$HOME/.virtualenvs
-source /usr/local/bin/virtualenvwrapper.sh
-
-workon <%= virtualenv_name %>
@@ -1,19 +0,0 @@
-Copyright (C) 2011 by Eivind Uggedal <eivind@uggedal.com>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
@@ -1,65 +0,0 @@
-Puppet PostgreSQL Module
-========================
-
-Module for configuring PostgreSQL.
-
-Tested on Debian GNU/Linux 6.0 Squeeze and Ubuntu 10.4 LTS with
-Puppet 2.6. Patches for other operating systems welcome.
-
-
-TODO
-----
-
-* Ability to configure authentication settings.
-
-
-Installation
-------------
-
-Clone this repo to a postgresql directory under your Puppet
-modules directory:
-
- git clone git://github.com/uggedal/puppet-module-postgresql.git postgresql
-
-If you don't have a Puppet Master you can create a manifest file
-based on the notes below and run Puppet in stand-alone mode
-providing the module directory you cloned this repo to:
-
- puppet apply --modulepath=modules test_postgresql.pp
-
-
-Usage
------
-
-To install and configure PostgreSQL, include the module:
-
- include postgresql::server
-
-You can override defaults in the PostgreSQL config by including
-the module with this special syntax:
-
- class { "postgresql::server": version => "8.4",
- listen_addresses => 'localhost',
- max_connections => 100,
- shared_buffers => '24MB',
- }
-
-If you need language specific PostgreSQL modules include their class:
-
- include postgresql::python
- include postgresql::ruby
-
-Creating a database is done with the `postgresql::database` resource. If
-the owner does not exist it is created:
-
- postgresql::database { "blog":
- owner => "bloguser",
- }
-
-Note that you'll need to define a global search path for the `exec`
-resource to make the `postgresql::database` resource function
-properly. This should ideally be placed in `manifests/site.pp`:
-
- Exec {
- path => "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
- }
@@ -1,89 +0,0 @@
-# PostgreSQL Client Authentication Configuration File
-# ===================================================
-#
-# Refer to the "Client Authentication" section in the
-# PostgreSQL documentation for a complete description
-# of this file. A short synopsis follows.
-#
-# This file controls: which hosts are allowed to connect, how clients
-# are authenticated, which PostgreSQL user names they can use, which
-# databases they can access. Records take one of these forms:
-#
-# local DATABASE USER METHOD [OPTIONS]
-# host DATABASE USER CIDR-ADDRESS METHOD [OPTIONS]
-# hostssl DATABASE USER CIDR-ADDRESS METHOD [OPTIONS]
-# hostnossl DATABASE USER CIDR-ADDRESS METHOD [OPTIONS]
-#
-# (The uppercase items must be replaced by actual values.)
-#
-# The first field is the connection type: "local" is a Unix-domain socket,
-# "host" is either a plain or SSL-encrypted TCP/IP socket, "hostssl" is an
-# SSL-encrypted TCP/IP socket, and "hostnossl" is a plain TCP/IP socket.
-#
-# DATABASE can be "all", "sameuser", "samerole", a database name, or
-# a comma-separated list thereof.
-#
-# USER can be "all", a user name, a group name prefixed with "+", or
-# a comma-separated list thereof. In both the DATABASE and USER fields
-# you can also write a file name prefixed with "@" to include names from
-# a separate file.
-#
-# CIDR-ADDRESS specifies the set of hosts the record matches.
-# It is made up of an IP address and a CIDR mask that is an integer
-# (between 0 and 32 (IPv4) or 128 (IPv6) inclusive) that specifies
-# the number of significant bits in the mask. Alternatively, you can write
-# an IP address and netmask in separate columns to specify the set of hosts.
-#
-# METHOD can be "trust", "reject", "md5", "password", "gss", "sspi", "krb5",
-# "ident", "pam", "ldap" or "cert". Note that "password" sends passwords
-# in clear text; "md5" is preferred since it sends encrypted passwords.
-#
-# OPTIONS are a set of options for the authentication in the format
-# NAME=VALUE. The available options depend on the different authentication
-# methods - refer to the "Client Authentication" section in the documentation
-# for a list of which options are available for which authentication methods.
-#
-# Database and user names containing spaces, commas, quotes and other special
-# characters must be quoted. Quoting one of the keywords "all", "sameuser" or
-# "samerole" makes the name lose its special character, and just match a
-# database or username with that name.
-#
-# This file is read on server startup and when the postmaster receives
-# a SIGHUP signal. If you edit the file on a running system, you have
-# to SIGHUP the postmaster for the changes to take effect. You can use
-# "pg_ctl reload" to do that.
-
-# Put your actual configuration here
-# ----------------------------------
-#
-# If you want to allow non-local connections, you need to add more
-# "host" records. In that case you will also need to make PostgreSQL listen
-# on a non-local interface via the listen_addresses configuration parameter,
-# or via the -i or -h command line switches.
-#
-
-
-
-
-# DO NOT DISABLE!
-# If you change this first entry you will need to make sure that the
-# database
-# super user can access the database using some other method.
-# Noninteractive
-# access to all databases is required during automatic maintenance
-# (custom daily cronjobs, replication, and similar tasks).
-#
-# Database administrative login by UNIX sockets
-local all postgres trust
-
-# TYPE DATABASE USER CIDR-ADDRESS METHOD
-
-# "local" is for Unix domain socket connections only
-#local all all trust
-# IPv4 local connections:
-#host all all 127.0.0.1/32 md5
-# IPv6 local connections:
-#host all all ::1/128 md5
-# This is for general access databases:
-local all all trust
-host all all 127.0.0.1/32 trust
@@ -1,5 +0,0 @@
-class postgresql::client {
- package { "postgresql-client":
- ensure => present,
- }
-}
Oops, something went wrong.

0 comments on commit 368b3a6

Please sign in to comment.