Skip to content

Commit 6bddf6d

Browse files
committed
Initial commit
0 parents  commit 6bddf6d

File tree

505 files changed

+28987
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

505 files changed

+28987
-0
lines changed

.gitignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Git Ignore File
2+
3+
# Directories
4+
docs/_ignore/*
5+
6+
# Vagrant files
7+
.vagrant
8+
9+
# Apple files
10+
.DS_Store
11+
*.key
12+
13+
14+

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
READ ME
2+
=======
3+
4+
# About
5+
6+
# Who
7+
8+

Vagrantfile

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
# -*- mode: ruby -*-
2+
# vi: set ft=ruby :
3+
4+
Vagrant::Config.run do |config|
5+
6+
#
7+
# Configure app VM - Apache2, PHP5
8+
#
9+
config.vm.define :app do |app_config|
10+
# Comment out gui line to run headless
11+
app_config.vm.boot_mode = :gui
12+
app_config.vm.box = "centos-6.3-nrel"
13+
app_config.vm.box_url = "http://developer.nrel.gov/downloads/vagrant-boxes/CentOS-6.3-x86_64-v20130101.box"
14+
app_config.vm.network :hostonly, "192.168.4.11"
15+
app_config.vm.forward_port 80, 8080
16+
17+
app_config.vm.provision :chef_solo do |chef|
18+
chef.cookbooks_path = "envs/v1/chef/cookbooks"
19+
chef.roles_path = "envs/v1/chef/roles"
20+
chef.add_role "base"
21+
chef.add_recipe "app_apache2"
22+
chef.add_recipe "php"
23+
end
24+
end
25+
26+
#
27+
# Configure db VM - PostgreSQL
28+
#
29+
config.vm.define :db do |db_config|
30+
# Comment out gui line to run headless
31+
db_config.vm.boot_mode = :gui
32+
db_config.vm.box = "centos-6.3-nrel"
33+
# Uncomment box_url ONLY IF not configuring app VM first AND centos-6.3-nrel not installed locally
34+
# db_config.vm.box_url = "http://developer.nrel.gov/downloads/vagrant-boxes/CentOS-6.3-x86_64-v20130101.box"
35+
db_config.vm.network :hostonly, "192.168.4.10"
36+
db_config.vm.forward_port 3306, 3306
37+
38+
db_config.vm.provision :chef_solo do |chef|
39+
chef.cookbooks_path = "envs/v1/chef/cookbooks"
40+
chef.roles_path = "envs/v1/chef/roles"
41+
# chef.data_bags_path = "envs/v1/chef/data_bags"
42+
chef.add_role "base"
43+
chef.add_recipe "postgresql_db"
44+
45+
#
46+
# You may also specify custom JSON attributes:
47+
chef.json = {
48+
:postgresql => {
49+
:password => { :postgres => "mypassword" }
50+
# login to psql at vagrant CLI: psql --username=postgres -h localhost
51+
# enter secret3 at password prompt.
52+
}
53+
}
54+
end
55+
end
56+
57+
# All Vagrant configuration is done here. The most common configuration
58+
# options are documented and commented below. For a complete reference,
59+
# please see the online documentation at vagrantup.com.
60+
61+
# Every Vagrant virtual environment requires a box to build off of.
62+
# config.vm.box = "centos-6.3-nrel"
63+
64+
# The url from where the 'config.vm.box' box will be fetched if it
65+
# doesn't already exist on the user's system.
66+
# config.vm.box_url = "http://developer.nrel.gov/downloads/vagrant-boxes/CentOS-6.3-x86_64-v20130101.box"
67+
68+
# Boot with a GUI so you can see the screen. (Default is headless)
69+
# config.vm.boot_mode = :gui
70+
71+
# Assign this VM to a host-only network IP, allowing you to access it
72+
# via the IP. Host-only networks can talk to the host machine as well as
73+
# any other machines on the same network, but cannot be accessed (through this
74+
# network interface) by any external networks.
75+
# config.vm.network :hostonly, "192.168.33.10"
76+
77+
# Assign this VM to a bridged network, allowing you to connect directly to a
78+
# network using the host's network device. This makes the VM appear as another
79+
# physical device on your network.
80+
# config.vm.network :bridged
81+
82+
# Forward a port from the guest to the host, which allows for outside
83+
# computers to access the VM, whereas host only networking does not.
84+
# config.vm.forward_port 80, 8080
85+
86+
# Share an additional folder to the guest VM. The first argument is
87+
# an identifier, the second is the path on the guest to mount the
88+
# folder, and the third is the path on the host to the actual folder.
89+
# config.vm.share_folder "v-data", "/vagrant_data", "../data"
90+
91+
# Enable provisioning with chef solo, specifying a cookbooks path, roles
92+
# path, and data_bags path (all relative to this Vagrantfile), and adding
93+
# some recipes and/or roles.
94+
#
95+
96+
end

apps/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<h1>Hello from a Vagrant VM inside /vagrant/apps/index.html</h1>

apps/util/phpinfo.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<?php phpinfo(); ?>
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
--
2+
-- Public Inspection File PostgreSQL Set Up Script
3+
-- Creates PostgreSQL database schema, database, roles, tables
4+
-- for SAMPLEDB Application
5+
--
6+
-- Created by Greg Elin <[email protected]>
7+
-- Version 0.1.0 03.21.2013
8+
--
9+
10+
--
11+
-- Dependency
12+
-- database sampledb must exist. Create from shell CLI with following:
13+
-- createdb sampledb --username=postgres --host=localhost
14+
--
15+
16+
--
17+
-- SET configuration
18+
--
19+
SET statement_timeout = 0;
20+
SET client_encoding = 'UTF8';
21+
SET standard_conforming_strings = off;
22+
SET check_function_bodies = false;
23+
SET client_min_messages = warning;
24+
SET escape_string_warning = off;
25+
26+
--
27+
-- Name: sample; Type: SCHEMA; Schema: -; Owner: sample_user
28+
--
29+
CREATE SCHEMA sample;
30+
31+
--
32+
-- Create sampledb_dbo_role
33+
--
34+
CREATE ROLE sampledb_dbo_role
35+
NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE;
36+
37+
GRANT all privileges on database sampledb to sampledb_dbo_role;
38+
GRANT all privileges on SCHEMA sample to sampledb_dbo_role;
39+
40+
--
41+
-- Create sample_user
42+
--
43+
CREATE ROLE sample_user LOGIN password 'sample_password'
44+
NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE;
45+
GRANT sampledb_dbo_role TO sample_user;
46+
47+
--
48+
-- Create sampledb_select_role
49+
--
50+
CREATE ROLE sampledb_select_role
51+
NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE;
52+
53+
ALTER SCHEMA sample OWNER TO sample_user;
54+
55+
--
56+
-- Name: staging; Type: SCHEMA; Schema: -; Owner: postgres
57+
--
58+
CREATE SCHEMA staging;
59+
ALTER SCHEMA staging OWNER TO postgres;
60+
61+
--
62+
-- Name: plpgsql; Type: PROCEDURAL LANGUAGE; Schema: -; Owner: postgres
63+
--
64+
CREATE OR REPLACE PROCEDURAL LANGUAGE plpgsql;
65+
ALTER PROCEDURAL LANGUAGE plpgsql OWNER TO postgres;
66+
SET search_path = sample, pg_catalog;
67+
SET default_tablespace = '';
68+
SET default_with_oids = false;
69+
70+
--
71+
-- Name: contact; Type: TABLE; Schema: sample_ Owner: sample_user; Tablespace:
72+
--
73+
CREATE TABLE contact (
74+
contact_id integer NOT NULL,
75+
call_sign character varying(10),
76+
first_name character varying(50),
77+
last_name character varying(50),
78+
phone character varying(20),
79+
email text,
80+
website_url text,
81+
time_stamp timestamp with time zone
82+
);
83+
84+
--
85+
-- Name: contact_contact_id_seq; Type: SEQUENCE; Schema: sample_ Owner: sample_user
86+
--
87+
CREATE SEQUENCE contact_contact_id_seq
88+
START WITH 1
89+
INCREMENT BY 1
90+
NO MINVALUE
91+
NO MAXVALUE
92+
CACHE 1;
93+
94+
ALTER TABLE sample.contact_contact_id_seq OWNER TO sample_user;
95+
96+
--
97+
-- Name: contact_contact_id_seq; Type: SEQUENCE OWNED BY; Schema: sample; Owner: sample_user
98+
--
99+
ALTER SEQUENCE contact_contact_id_seq OWNED BY contact.contact_id;
100+
101+
--
102+
-- Name: contact_contact_id_seq; Type: SEQUENCE SET; Schema: sample_ Owner: sample_user
103+
--
104+
SELECT pg_catalog.setval('contact_contact_id_seq', 2160, true);
105+
106+
--
107+
-- Data for Name: contact; Type: TABLE DATA; Schema: staging; Owner: postgres
108+
--
109+
COPY contact (contact_id, first_name, last_name, phone, phone_ext, email, website_url, time_stamp) FROM stdin;
110+
2096 Han Solo 801-303-8500 han@hotmail.com myspace.com/han 2012-10-16 12:24:24-04
111+
2097 Princess Leah 801-315-1111 princess@gmail.com princessleah.me 2012-10-16 13:12:38-04
112+
2098 Luke Skywalker 202-555-1212 luke@destiny.com skywalker.github.com 2012-10-16 13:52:06-04
113+
\.
114+
115+

docs/project/answers.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Answers
2+
=======
3+
4+
#
5+
6+

docs/project/episodes.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Episode Guide
2+
=============
3+
4+
# Episode 1: Project start
5+
<date>
6+
Keep track of work by writing short, TV-style synopsis of what happened. Write in third-person.

docs/project/links.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Links
2+
=====
3+
4+
#

docs/project/notes.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Notes
2+
=====
3+
4+
#
5+
6+

0 commit comments

Comments
 (0)