This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $db_host = "192.168.33.10" | |
| $db_schema = "loja_schema" | |
| $db_user = "loja" | |
| $db_password = "lojasecret" | |
| exec { "apt-update": | |
| command => "/usr/bin/apt-get update" | |
| } | |
| package {["mysql-client", "tomcat7"]: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| exec { "apt-update": | |
| command => "/usr/bin/apt-get update" | |
| } | |
| package { "mysql-server": | |
| ensure => installed, | |
| require => Exec["apt-update"], | |
| } | |
| file { "/etc/mysql/conf.d/allow_external.cnf": |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| define hostgroup { | |
| hostgroup_name db-servers | |
| alias Database Servers | |
| } | |
| define hostgroup { | |
| hostgroup_name web-servers | |
| alias Web Servers | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- The contents of this file will be loaded for each web application --> | |
| <Context> | |
| <!-- Default set of monitored resources --> | |
| <WatchedResource>WEB-INF/web.xml</WatchedResource> | |
| <Resource name="jdbc/web" auth="Container" type="javax.sql.DataSource" maxActive="100" | |
| maxIdle="30" maxWait="10000" username="<%= db_user %>" password="<%= db_password %>" driverClassName="com.mysql.jdbc.Driver" | |
| url="jdbc:mysql://<%= db_host %>:3306/<%= db_schema %>"/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [mysqld] | |
| bind-address = 9.9.9.9 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| VAGRANTFILE_API_VERSION = "2" | |
| Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
| config.vm.box = "hashicorp/precise32" | |
| config.vm.define :db do |db_config| | |
| db_config.vm.network :private_network, :ip => "192.168.33.10" | |
| db_config.vm.provision "puppet" do |puppet| | |
| puppet.manifest_file = "db.pp" | |
| end |