Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Final Source Code #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .vagrant/machines/db/virtualbox/action_provision

This file was deleted.

1 change: 0 additions & 1 deletion .vagrant/machines/db/virtualbox/action_set_name

This file was deleted.

1 change: 0 additions & 1 deletion .vagrant/machines/db/virtualbox/id

This file was deleted.

1 change: 0 additions & 1 deletion .vagrant/machines/db/virtualbox/index_uuid

This file was deleted.

27 changes: 0 additions & 27 deletions .vagrant/machines/db/virtualbox/private_key

This file was deleted.

1 change: 0 additions & 1 deletion .vagrant/machines/db/virtualbox/synced_folders

This file was deleted.

2 changes: 1 addition & 1 deletion .vagrant/machines/default/virtualbox/action_provision
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.5:62ae6e4c-8a10-4bf2-95f0-b6b61d6c2363
1.5:f5100d7a-653c-4317-9cfe-e6efd7490813
2 changes: 1 addition & 1 deletion .vagrant/machines/default/virtualbox/action_set_name
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1430290894
1431324321
1 change: 1 addition & 0 deletions .vagrant/machines/default/virtualbox/berkshelf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
c:/Users/polaaditya/.berkshelf/vagrant-berkshelf/shelves/berkshelf20150511-5320-1v1lbm3-default
2 changes: 1 addition & 1 deletion .vagrant/machines/default/virtualbox/id
Original file line number Diff line number Diff line change
@@ -1 +1 @@
62ae6e4c-8a10-4bf2-95f0-b6b61d6c2363
f5100d7a-653c-4317-9cfe-e6efd7490813
2 changes: 1 addition & 1 deletion .vagrant/machines/default/virtualbox/index_uuid
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5149007359fc4173a52869d637ed7fe7
0dc80ed9c0b1489aa1ccdf4873ef2927
50 changes: 25 additions & 25 deletions .vagrant/machines/default/virtualbox/private_key
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
-----BEGIN RSA PRIVATE KEY-----
MIIEpAIBAAKCAQEA3cPNOvM3iusbikeWKs7u7Ve2QT6EWjSOxUio2ftKsUz/jn8E
+qaS+nDvh3lZNFlsCzMCQy9becQhqLSJQJNhUyiLXEL6NBufQnYJEjgcaUw/JBZi
osqWEye2gdBcXD6JFTif3o1suot8hAqKuh4t+sC2fWa8dt/3vTYSVWgHUwYdFP4j
07pDqh68kMdO43DSoeM3i4228NQdKS25LwKw5ajR78cnnkc4NEjybOCg+neNe3dJ
9H8AYiL6CGFvPOeZUdluLMdPYy9HxWya6OSMj9FXKwhCkl6MyKTMgxsPV2bHmUi3
+OtK6D/z5efjnzG30wSZ/uEXB7lNlYdCvn/CCQIDAQABAoIBAGaAnlflG4MmcLBV
rl9TDrS9mgxGLT7UlDk0AHfg4wFYqbbflxmT7NO9Z7miqUy9GGeEyELtnMaHlVc5
O0eR16ZsUx3uB2AWdGJv1HmLXfZ9u6GehzDfmsZ30K/n8wjgDtS0O5DOpbcDyiXu
CXlFgdMpSDBmUC5SD1xxpb+8OcZxbKTbMcT0KrCI1JGrue87m0juxbqJ8+zugRk7
lAAIb5zVtJQcPydgIsD3CsQ4nDTQUkKyzV4B1aOGdi5JCbgw2BQBFcfchNxC8grb
Ze4wS5vMzqagD4DboYq3iLCi50DdD+1iTUfTSzc6RiJo0GSEbRxx9amrsWCUYg//
H3J8rVECgYEA89+75gp3pRPEBuW1XqgKZZVEAtdeE6VzthwfP6LNJbxmm7wIKcJA
AeYjUUWVGk1ilG3Fy2fzlH5/85EupyBVF9iFOcX+eMyhGDuX5dXVCHxxDWuEyiI9
5Z8z8vkJxPbWYP8gwaW8lld4NfFL7/PppVB1ZWvDzlSpigaihm/kKZMCgYE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EwKBgQCmj1x5Dv0ir1y8FifHsVjLuD38ogkNxbbXzieEbkrltiQWwoEELUFo
IYxJNp+meOv7ISOtKbCdp/NxiNI/A2MEKCf/4PC+yZC71RCBxaYFaRV7pS4B8ntw
fLtvYZPgFWCsJzuuBn5Z2wD1CyCVVqnHJslMiLvrqQX4m2UTJOlNhA==
-----END RSA PRIVATE KEY-----
2 changes: 1 addition & 1 deletion .vagrant/machines/default/virtualbox/synced_folders
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"virtualbox":{"/vagrant":{"guestpath":"/vagrant","hostpath":"C:/Users/polaaditya/Documents/project/my-organization","disabled":false},"/var/www":{"guestpath":"/var/www","hostpath":"C:/Users/polaaditya/Documents/project","disabled":false}}}
{"virtualbox":{"/vagrant":{"guestpath":"/vagrant","hostpath":"C:/Users/polaaditya/Documents/task","disabled":false},"v-csc-1":{"id":"v-csc-1","guestpath":"/tmp/vagrant-chef/2484a934b34e4d7a48c3143f7d1ac76f/cookbooks","hostpath":"C:/Users/polaaditya/.berkshelf/vagrant-berkshelf/shelves/berkshelf20150511-5320-1v1lbm3-default","disabled":false},"v-csr-2":{"id":"v-csr-2","guestpath":"/tmp/vagrant-chef/4dbca6568c5594878f28d842410c5848/roles","hostpath":"C:/Users/polaaditya/Documents/task/chef/roles","disabled":false}}}
1 change: 0 additions & 1 deletion .vagrant/machines/web/virtualbox/action_provision

This file was deleted.

1 change: 0 additions & 1 deletion .vagrant/machines/web/virtualbox/action_set_name

This file was deleted.

1 change: 0 additions & 1 deletion .vagrant/machines/web/virtualbox/id

This file was deleted.

1 change: 0 additions & 1 deletion .vagrant/machines/web/virtualbox/index_uuid

This file was deleted.

27 changes: 0 additions & 27 deletions .vagrant/machines/web/virtualbox/private_key

This file was deleted.

1 change: 0 additions & 1 deletion .vagrant/machines/web/virtualbox/synced_folders

This file was deleted.

87 changes: 8 additions & 79 deletions Vagrantfile
Original file line number Diff line number Diff line change
@@ -1,89 +1,18 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :

# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.

$script = <<SCRIPT
apt-get -y install mysql
apt-get -y install apache2
apt-get update
SCRIPT

Vagrant.configure(2) do |config|

config.vm.provision "shell", inline: $script
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
# https://docs.vagrantup.com.

# Every Vagrant development environment requires a box. You can search for
# boxes at https://atlas.hashicorp.com/search.
config.vm.box = "hashicorp/precise64"

# Disable automatic box update checking. If you disable this, then
# boxes will only be checked for updates when the user runs
# `vagrant box outdated`. This is not recommended.
# config.vm.box_check_update = false

# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine. In the example below,
# accessssing "localhost:8080" will access port 80 on the guest machine.
config.vm.network "forwarded_port", guest: 80, host: 8081
# Create a private network, which allows host-only access to the machine
# using a specific IP.
# config.vm.network "private_network", ip: "192.168.33.10"

# Create a public network, which generally matched to bridged network.
# Bridged networks make the machine appear as another physical device on
# your network.
# config.vm.network "public_network"

# Share an additional folder to the guest VM. The first argument is
# the path on the host to the actual folder. The second argument is
# the path on the guest to mount the folder. And the optional third
# argument is a set of non-required options.
config.vm.synced_folder "/Users/polaaditya/Documents/project/", "/var/www"

# Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options.
# Example for VirtualBox:
#
config.vm.provider "virtualbox" do |vb|
# Display the VirtualBox GUI when booting the machine
# vb.gui = true

# Customize the amount of memory on the VM:
vb.memory = "1024"
end
#
# View the documentation for the provider you are using for more
# information on available options.

# Define a Vagrant Push strategy for pushing to Atlas. Other push strategies
# such as FTP and Heroku are also available. See the documentation at
# https://docs.vagrantup.com/v2/push/atlas.html for more information.
# config.push.define "atlas" do |push|
# push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME"
# end

# Enable provisioning with a shell script. Additional provisioners such as
# Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
# documentation for more information about their specific syntax and use.
# config.vm.provision "shell", inline: <<-SHELL
# sudo apt-get update
# sudo apt-get install -y apache2
# SHELL
config.vm.define "web" do |web|
web.vm.box = "chef/centos-6.5"
config.vm.network "private_network", ip: "192.168.33.10"
config.berkshelf.enabled = true
config.berkshelf.berksfile_path = 'chef/cookbooks/task_tomcat/Berksfile'
config.vm.provision :chef_zero do |chef|
chef.cookbooks_path = "chef/cookbooks"
chef.roles_path = "chef/roles"
chef.add_role "tomcat_sample"
end

config.vm.define "db" do |db|
db.vm.box = "michaelbrooks/ubuntu-django"
db.vm.network "private_network", ip: "10.255.255.40"
db.vm.hostname = "db.dev.support.geeksquad.com"
end


end
8 changes: 0 additions & 8 deletions chef/cookbooks/myorg_apache/recipes/default.rb

This file was deleted.

23 changes: 23 additions & 0 deletions chef/cookbooks/task_tomcat/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
*~
*#
.#*
\#*#
.*.sw[a-z]
*.un~
pkg/

# Berkshelf
.vagrant
/cookbooks

Berksfile.lock


# Bundler
Gemfile.lock
bin/*
.bundle/*


.kitchen/
.kitchen.local.yml
31 changes: 31 additions & 0 deletions chef/cookbooks/task_tomcat/.kitchen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
driver:
name: vagrant

provisioner:
name: chef_solo

platforms:
- name: ubuntu-12.04

suites:
- name: default
run_list:
- recipe[apt]
- recipe[java]
- recipe[tomcat]
- recipe[task_tomcat::default]

attributes: {
"java": {
"install_flavor": "oracle",
"jdk_version": "7",
"oracle": {
"accept_oracle_download_terms": true
}
},
"tomcat": {
"base_version": "7",
"java_options": "${JAVA_OPTS} -Xmx128M"
}
}
7 changes: 7 additions & 0 deletions chef/cookbooks/task_tomcat/Berksfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
source "https://supermarket.chef.io"

metadata

cookbook 'apt', '~> 2.7.0'
cookbook 'java', '~> 1.31.0'
cookbook 'tomcat', '~> 0.17.3'
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
myorg_apache CHANGELOG
task_tomcat CHANGELOG
======================

This file is used to list changes made in each version of the myorg_apache cookbook.
This file is used to list changes made in each version of the task_tomcat cookbook.

0.1.0
-----
- [your_name] - Initial release of myorg_apache
- [your_name] - Initial release of task_tomcat

- - -
Check the [Markdown Syntax Guide](http://daringfireball.net/projects/markdown/syntax) for help with Markdown.
Expand Down
20 changes: 20 additions & 0 deletions chef/cookbooks/task_tomcat/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
source 'https://rubygems.org'

gem 'berkshelf'

# Uncomment these lines if you want to live on the Edge:
#
# group :development do
# gem "berkshelf", github: "berkshelf/berkshelf"
# gem "vagrant", github: "mitchellh/vagrant", tag: "v1.6.3"
# end
#
# group :plugins do
# gem "vagrant-berkshelf", github: "berkshelf/vagrant-berkshelf"
# gem "vagrant-omnibus", github: "schisamo/vagrant-omnibus"
# end



gem "test-kitchen"
gem "kitchen-vagrant"
Loading