Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 115 lines (83 sloc) 4.805 kb
b9764af @jashkenas provisioning docs, and abhay bumped his calais to take our patch, so we ...
jashkenas authored
1 Until we have full provisioning scripts, keep notes about everything that we
2 touch on EC2 in here.
3
01cf130 @jashkenas first draft of the in-progress documentcloud image
jashkenas authored
4 ========================= Base DocumentCloud Image ============================
f3df550 @jashkenas updating the preconfigured_ami_id
jashkenas authored
5 ====================== dcworker has all the steps below ======================
fd4a38c @jashkenas first round of provisioning, with keys and conf in config
jashkenas authored
6 ==================== based on the snap-05235d6c snapshot ======================
01cf130 @jashkenas first draft of the in-progress documentcloud image
jashkenas authored
7
9a2e0a7 @jashkenas update provisioning
jashkenas authored
8 * Use the official Canonical Ubuntu 10.04 Lucid Image: ami-714ba518
01cf130 @jashkenas first draft of the in-progress documentcloud image
jashkenas authored
9 Use the us-east-1c availability zone.
10
11 * If bundling an EBS Boot Volume, follow the directions here (mas o menos):
12 http://alestic.com/2010/01/ec2-ebs-boot-ubuntu
13 At step 5, continue with our custom configuration below....
14
b9764af @jashkenas provisioning docs, and abhay bumped his calais to take our patch, so we ...
jashkenas authored
15 * Switch to a temporary directory.
16
17 * Update aptitude.
18
19 * Install these packages:
01cf130 @jashkenas first draft of the in-progress documentcloud image
jashkenas authored
20 build-essential postgresql postgresql-client postgresql-contrib libpq-dev \
21 sun-java6-bin git-core mercurial scons libexpat-dev libxml2-dev libxslt-dev \
4ecf77f @jashkenas more config
jashkenas authored
22 postfix ruby ri rdoc irb ruby1.8-dev zlib1g-dev libzlib-ruby sqlite3 \
01cf130 @jashkenas first draft of the in-progress documentcloud image
jashkenas authored
23 libsqlite3-dev libcurl4-dev checkinstall libbz2-dev graphicsmagick pdftk xpdf \
24 libitext-java openoffice.org openoffice.org-java-common libtiff4-dev \
25 libpng12-dev libjpeg62-dev libleptonica-dev tesseract-ocr-dev tesseract-ocr-eng \
9a2e0a7 @jashkenas update provisioning
jashkenas authored
26 xfsprogs libpcre3-dev graphicsmagick
b9764af @jashkenas provisioning docs, and abhay bumped his calais to take our patch, so we ...
jashkenas authored
27
28 * Install RubyGems:
4ecf77f @jashkenas more config
jashkenas authored
29 DO NOT INSTALL RUBYGEMS THROUGH APT-GET (or you'll live to regret it)
9a2e0a7 @jashkenas update provisioning
jashkenas authored
30 wget http://production.cf.rubygems.org/rubygems/rubygems-1.3.7.tgz && \
b9764af @jashkenas provisioning docs, and abhay bumped his calais to take our patch, so we ...
jashkenas authored
31 tar xzvf rubygems-1.3.5.tgz
32 ruby rubygems-1.3.5/setup.rb
33 ln -s /usr/bin/gem1.8 /usr/local/bin/gem
4ecf77f @jashkenas more config
jashkenas authored
34 sudo gem update --system
b9764af @jashkenas provisioning docs, and abhay bumped his calais to take our patch, so we ...
jashkenas authored
35
36 * Install these gems (--no-ri --no-rdoc):
b7ef0fd @jashkenas switching from the outmoded 'postgres' gem to the up-to-date 'pg' gem. A...
jashkenas authored
37 pg sqlite3-ruby rails passenger sinatra right_aws rest-client rack \
1ce38e4 @jashkenas adding rdiscount dependency.
jashkenas authored
38 bcrypt-ruby rdiscount rubyzip libxml-ruby nokogiri json hpricot calais \
2dab168 @jashkenas initial index schema of solr and sunspot solr
jashkenas authored
39 curb daemons cloud-crowd yui-compressor jammit docsplit sunspot sunspot_rails
b9764af @jashkenas provisioning docs, and abhay bumped his calais to take our patch, so we ...
jashkenas authored
40
fd4a38c @jashkenas first round of provisioning, with keys and conf in config
jashkenas authored
41 * Add the gem bin directory to the path, in .bashrc.
42 export PATH="$PATH:/var/lib/gems/1.8/bin"
43
98a755e @jashkenas updating provisioning
jashkenas authored
44 * Install Node.js (from source, unfortunately): Nodejs.org (v0.1.99)
45
fd4a38c @jashkenas first round of provisioning, with keys and conf in config
jashkenas authored
46 * Install the SSH credentials (for the current user, root on the EBS chroot):
01cf130 @jashkenas first draft of the in-progress documentcloud image
jashkenas authored
47 mkdir -p ~/.ssh (or /root/.ssh)
6a6e7cf @jashkenas repointing secret configuration to secret dir
jashkenas authored
48 Copy the contents of secrets/keys/github.pem to .ssh/id_dsa
01cf130 @jashkenas first draft of the in-progress documentcloud image
jashkenas authored
49 chmod 0600 .ssh/id_dsa
50
51 * Checkout DocumentCloud:
bbf061c @knowtheory Full repository switchover for app deployment.
knowtheory authored
52 git clone git@github.com:documentcloud/documentcloud.git ~/documentcloud
98a755e @jashkenas updating provisioning
jashkenas authored
53
54 * Checkout Pixel Ping:
55 git clone git@github.com:documentcloud/pixel-ping.git ~/pixel-ping
01cf130 @jashkenas first draft of the in-progress documentcloud image
jashkenas authored
56
fd4a38c @jashkenas first round of provisioning, with keys and conf in config
jashkenas authored
57 * Turn off smtpd_use_tsl in /etc/postfix/main.cf.
01cf130 @jashkenas first draft of the in-progress documentcloud image
jashkenas authored
58
fd4a38c @jashkenas first round of provisioning, with keys and conf in config
jashkenas authored
59 * Check out the latest stable nginx source, then use
4b918e4 @jashkenas Config changes for passenger 3
jashkenas authored
60 passenger-install-nginx-module to install a custom nginx (0.8.53),
fd4a38c @jashkenas first round of provisioning, with keys and conf in config
jashkenas authored
61 with prefix /usr/local/nginx, and including
4ecf77f @jashkenas more config
jashkenas authored
62 --with-http_gzip_static_module --with-http_ssl_module
fd4a38c @jashkenas first round of provisioning, with keys and conf in config
jashkenas authored
63
25fff9b @jashkenas rearranging server config
jashkenas authored
64 * Copy over the nginx.conf config from config/server/nginx to /usr/local/nginx/conf.
fd4a38c @jashkenas first round of provisioning, with keys and conf in config
jashkenas authored
65 Copy over the appropriate environment config to sites-enabled.
d25947c @jashkenas provisioning docs
jashkenas authored
66 Add /usr/local/nginx/sbin to the PATH in .bashrc.
67 mkdir -p /var/log/nginx
01cf130 @jashkenas first draft of the in-progress documentcloud image
jashkenas authored
68
fd4a38c @jashkenas first round of provisioning, with keys and conf in config
jashkenas authored
69 * In /etc/sysctl.conf set
70 kernel.shmmax = 852352256
71
25fff9b @jashkenas rearranging server config
jashkenas authored
72 * Copy over config/server/postgresql.conf to
73 /etc/postgresql/8.4/main/postgresql.conf
74
75 * Copy over config/server/gitconfig.conf to ~/.gitconfig
fd4a38c @jashkenas first round of provisioning, with keys and conf in config
jashkenas authored
76
77 * If bundling, move on to Step 6 of Hammond's directions, but ensure that
78 EC2_CERT and EC2_PRIVATE_KEY are set correctly, and that the size of the EBS
79 is 40 GB. You can use a better name for the $prefix, and a better description.
80 Also, use availability zone 1c.
01cf130 @jashkenas first draft of the in-progress documentcloud image
jashkenas authored
81
82 * Clean up the temporary directory.
83
6836113 @jashkenas new readme
jashkenas authored
84 ============================= Postgres EBS ===================================
b9764af @jashkenas provisioning docs, and abhay bumped his calais to take our patch, so we ...
jashkenas authored
85
05dfa29 @jashkenas postgres ebs configuration
jashkenas authored
86 * Follow the directions here:
87 http://deadprogrammersociety.blogspot.com/2009/08/postgresql-on-ubuntu-on-ec2.html
88 Follow Mike's directions to move the Postgres files to the EBS:
89 http://gist.github.com/272258
90 Copy over configuration from config/server/postgres to /etc/postgresql/8.4/main...
91 pg_ctlcluster 8.4 main start
6836113 @jashkenas new readme
jashkenas authored
92 Our postgre DB (volume vol-d4c305bd) is mounted at /data.
93
5044444 @jashkenas adding install directions for hstore
jashkenas authored
94 * Install the HStore module, by cd-ing into the contrib directory of your postgres, and following the directions here:
95
96 http://www.postgresql.org/docs/8.3/static/contrib.html
97
6836113 @jashkenas new readme
jashkenas authored
98 ============================= Development ====================================
99
100 * Install the dependencies and gems listed in PROVISIONING, as appropriate
101 (ie, don't install Tesseract unless you're planning on doing OCR).
102
103 * Configure Nginx and /etc/hosts to serve dev.dcloud.org locally. An example
104 Nginx configuration is stored in config/server/nginx
105
57946d4 @knowtheory Add note about setting up the analytics db too.
knowtheory authored
106 * Load the development_structure.sql into the database listed in config/database.yml.
107 Load the analytics_structure.sql into the database listed in config/database_analytics.yml
6836113 @jashkenas new readme
jashkenas authored
108
109 * Create your CloudCrowd database, using the config/cloud_crowd/development
110 configuration folder.
111
112 * Start a local CloudCrowd server and node, with
113 `rake crowd:server:start crowd:node:start`
114
115 * Start Nginx.
Something went wrong with that request. Please try again.