Deploy nginx reverse proxy for RSK mainnet

pull/337/head
raucao 1 year ago
parent 0e1b362644
commit 584da20d3e
Signed by: raucao
GPG Key ID: 9F88009D31D99C72
  1. 19
      nodes/rsk-mainnet-1.json
  2. 11
      roles/rsk_mainnet.rb
  3. 19
      roles/rskj_mainnet.rb
  4. 2
      site-cookbooks/kosmos_rsk/templates/nginx_conf_rskj.erb

@ -12,12 +12,13 @@
"hostname": "rsk-mainnet-1",
"ipaddress": "192.168.122.233",
"roles": [
"rsk_mainnet"
"rskj_mainnet"
],
"recipes": [
"kosmos-base",
"kosmos-base::default",
"kosmos_rsk::rskj",
"kosmos_rsk::nginx",
"apt::default",
"timezone_iii::default",
"timezone_iii::debian",
@ -32,8 +33,20 @@
"postfix::_attributes",
"postfix::sasl_auth",
"hostname::default",
"kosmos_rsk::firewall",
"firewall::default",
"chef-sugar::default"
"chef-sugar::default",
"kosmos-nginx::default",
"nginx::default",
"nginx::package",
"nginx::ohai_plugin",
"nginx::repo",
"nginx::commons",
"nginx::commons_dir",
"nginx::commons_script",
"nginx::commons_conf",
"kosmos-nginx::firewall",
"kosmos-base::letsencrypt"
],
"platform": "ubuntu",
"platform_version": "20.04",
@ -52,6 +65,6 @@
},
"run_list": [
"recipe[kosmos-base]",
"role[rsk_mainnet]"
"role[rskj_mainnet]"
]
}

@ -1,11 +0,0 @@
name "rsk_mainnet"
run_list %w(
kosmos_rsk::rskj
)
override_attributes(
:rskj => {
:network => "mainnet"
}
)

@ -0,0 +1,19 @@
name 'rskj_mainnet'
default_attributes 'rskj' => {
'network' => 'mainnet',
'nginx' => {
'domain' => 'rsk.kosmos.org'
}
}
default_run_list = %w(
kosmos_rsk::rskj
kosmos_rsk::nginx
)
env_run_lists(
'_default' => default_run_list,
'development' => default_run_list,
'production' => default_run_list
)

@ -16,7 +16,7 @@ server {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_redirect off;
proxy_pass localhost:<%= @port %>;
proxy_pass http://localhost:<%= @port %>;
}
}
<% end -%>

Loading…
Cancel
Save