diff --git a/Rakefile b/Rakefile index ea54cbc..549d619 100644 --- a/Rakefile +++ b/Rakefile @@ -41,7 +41,8 @@ if $SPB_ENV == 'lxc' end File.open('config/lxc/iptables-filter-rules', 'w') do |f| - lxc_host_bridge_ip = '192.168.122.1' # FIXME don't hardcode + #COLOCAR O IP DA BRIDGE DO SEU LXC.. RODAR COMANDO IFCONFIG PARA VER QUAL IP QUE É O SEU + lxc_host_bridge_ip = '10.0.3.1' # FIXME don't hardcode f.puts "-A INPUT -s #{lxc_host_bridge_ip} -p tcp -m state --state NEW --dport 22 -j ACCEPT" f.puts "-A INPUT -s #{lxc_host_bridge_ip} -p tcp -m state --state NEW --dport 5555 -j ACCEPT" end @@ -76,7 +77,7 @@ task :console do end task :test do - sh "SPB_ENV=#{$SPB_ENV} ./test/run_all" + sh "SPB_ENV=lxc ./test/run_all" end file 'ssh_config.erb' diff --git a/Vagrantfile b/Vagrantfile index 833c48a..07d66eb 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -9,12 +9,11 @@ load './local.rake' if File.exists?('local.rake') VAGRANTFILE_API_VERSION = "2" Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| - config.vm.box = ENV.fetch("VAGRANT_BOX", 'seocam/centos-7.0') + config.vm.box = "frensjan/centos-7-64-lxc" proxy = ENV['http_proxy'] || ENV['HTTP_PROXY'] if proxy config.vm.provision 'shell', path: 'utils/proxy.sh', args: [proxy] end - env = ENV.fetch('SPB_ENV', 'local') if File.exist?("config/#{env}/ips.yaml") @@ -24,30 +23,23 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| end config.vm.define 'database' do |database| - database.vm.provider "virtualbox" do |vm, override| - override.vm.network 'private_network', ip: ips['database'] if ips + database.vm.provider "lxc" do |vm, override| end end config.vm.define 'integration' do |integration| - integration.vm.provider "virtualbox" do |vm, override| - override.vm.network 'private_network', ip: ips['integration'] if ips - vm.memory = 1024 - vm.cpus = 2 + integration.vm.provider "lxc" do |vm, override| end end config.vm.define 'email' do |email| - email.vm.provider "virtualbox" do |vm, override| - override.vm.network 'private_network', ip: ips['email'] if ips + email.vm.provider "lxc" do |vm, override| end end config.vm.define 'social' do |social| - social.vm.provider "virtualbox" do |vm, override| - override.vm.network 'private_network', ip: ips['social'] if ips + social.vm.provider "lxc" do |vm, override| end end config.vm.define 'reverseproxy' do |reverseproxy| - reverseproxy.vm.provider "virtualbox" do |vm, override| - override.vm.network 'private_network', ip: ips['reverseproxy'] if ips + reverseproxy.vm.provider "lxc" do |vm, override| end if File.exist?("tmp/preconfig.#{env}.stamp") reverseproxy.ssh.port = File.read("tmp/preconfig.#{env}.stamp").strip.to_i diff --git a/docs/build.rb b/docs/build.rb index ada479e..288eabb 100644 --- a/docs/build.rb +++ b/docs/build.rb @@ -6,12 +6,12 @@ $_.gsub!('@@SPB_ENV@@', $SPB_ENV) config = YAML.load_file("../config/#{$SPB_ENV}/config.yaml") config.each do |key,value| - $_.gsub!("@@#{key}@@", value.to_s) + # $_.gsub!("@@#{key}@@", value.to_s) end $_.gsub!(/@@config\(([^\)]*)\)@@/) do |f| - lines = File.read("../config/#{$SPB_ENV}/#{$1}").lines - lines.shift + lines.map do |line| - ' ' + line - end.join + #lines = File.read("../config/#{$SPB_ENV}/#{$1}").lines + # lines.shift + lines.map do |line| + # ' ' + line +# end.join end -- libgit2 0.21.2