Download and install VirtualBox
Download and install Vagrant
Clone devstack repository
git clone git://github.com/openstack-dev/devstack.git
Switch to devstack directory
| user { "git": | |
| home => "/var/git", | |
| ensure => present | |
| } | |
| file { | |
| "/var/git": | |
| ensure => directory, | |
| owner => "git", | |
| group => "git", |
Download and install VirtualBox
Download and install Vagrant
Clone devstack repository
git clone git://github.com/openstack-dev/devstack.git
Switch to devstack directory
| worker_processes 1; | |
| events { | |
| worker_connections 1024; | |
| } | |
| http { | |
| include mime.types; | |
| default_type application/octet-stream; | |
| sendfile on; |
| echo -ne $B"Do you have an existing key to use? (y/N) "$RESET; read REPLY | |
| REPLY=${REPLY:-N} | |
| case $REPLY in | |
| Yes|Y|y ) | |
| PRIVATE_KEY_FILE=`pick_ssh_public_key` | |
| ;; | |
| No|N|n|* ) | |
| echo -e $B"Creating ssh key"$RESET | |
| if [[ -f $SSH_KEY_FILENAME ]]; then | |
| echo -ne $R"Key ($SSH_KEY_FILENAME) already exists. Delete? (Y/n) "$RESET; read REPLY |
| #!/bin/bash | |
| # chkconfig: 2345 90 90 | |
| # description: program_name | |
| ### BEGIN INIT INFO | |
| # Provides: program_name | |
| # Required-Start: network | |
| # Required-Stop: network | |
| # Default-Start: 2 3 4 5 | |
| # Default-Stop: 0 1 6 | |
| # Description: Start the program |
| name "elasticsearch" | |
| description "Install and configure elasticsearch" | |
| run_list( | |
| "role[network]", | |
| "role[yum]", | |
| "recipe[java]", | |
| "recipe[elasticsearch]" | |
| ) | |
| default_attributes({ |
| input { | |
| file { | |
| path => [ "/var/log/messages", "/var/log/kern.log" ] | |
| type => "linux-syslog" | |
| } | |
| file { | |
| path => "/var/log/apache2/access.log" | |
| type => "apache-access" | |
| } |
| input { | |
| exec { | |
| type => "dstat" | |
| command => "dstat -cdngypms --nocolor 1 0" | |
| interval => 13 | |
| } | |
| exec { | |
| type => "apache-benchmark" |
| [2013-08-20T22:07:58+00:00] INFO: Processing directory[/opt/logstash/beaver] action create (logstash::beaver line 61) | |
| [2013-08-20T22:07:58+00:00] INFO: directory[/opt/logstash/beaver] created directory /opt/logstash/beaver | |
| [2013-08-20T22:07:58+00:00] INFO: directory[/opt/logstash/beaver] owner changed to 997 | |
| [2013-08-20T22:07:58+00:00] INFO: directory[/opt/logstash/beaver] group changed to 997 | |
| [2013-08-20T22:07:58+00:00] INFO: Processing directory[/opt/logstash/beaver/etc] action create (logstash::beaver line 72) | |
| [2013-08-20T22:07:58+00:00] INFO: directory[/opt/logstash/beaver/etc] created directory /opt/logstash/beaver/etc | |
| [2013-08-20T22:07:58+00:00] INFO: directory[/opt/logstash/beaver/etc] owner changed to 997 | |
| [2013-08-20T22:07:58+00:00] INFO: directory[/opt/logstash/beaver/etc] group changed to 997 | |
| [2013-08-20T22:07:58+00:00] INFO: Processing directory[/var/log/logstash] action create (logstash::beaver line 72) | |
| [2013-08-20T22:07:58+00:00] INFO: directory[/var/log/logstash] created directory /var/log/logst |
| vars.yml: | |
| --- | |
| project_name: myproject | |
| project_root: /var/projects/myproject | |
| project_repo: [email protected]:username/myproject.git | |
| system_packages: | |
| - build-essential | |
| - git | |
| - libevent-dev | |
| - nginx |