From 84117c28331472ddf00ad233701723692dcd53cf Mon Sep 17 00:00:00 2001 From: _IM <70502803+intl-man@users.noreply.github.com> Date: Tue, 17 Nov 2020 16:31:03 +0800 Subject: [PATCH] [ChainOps] feature/build-rename (#280) * Ignore deploy/networks. * Renamed build -> deploy. * Tweaks/cleanup. --- .gitignore | 2 +- Rakefile | 2 +- build/lib/os.rb | 19 ----------------- {build => deploy}/.gitkeep | 0 {build => deploy}/Gemfile | 0 {build => deploy}/Gemfile.lock | 0 {build => deploy}/genesis/Dockerfile | 0 .../genesis/docker-compose-ganache.yml | 0 {build => deploy}/genesis/docker-compose.yml | 0 .../helm/block-explorer/.gitignore | 0 .../helm/block-explorer/.helmignore | 0 .../helm/block-explorer/Chart.yaml | 0 .../helm/block-explorer/templates/NOTES.txt | 0 .../block-explorer/templates/_helpers.tpl | 0 .../templates/configmap-settings.yaml | 0 .../templates/configmap-url.yaml | 0 .../block-explorer/templates/deployment.yaml | 0 .../block-explorer/templates/ingress.yaml | 0 .../helm/block-explorer/templates/rbac.yaml | 0 .../block-explorer/templates/service.yaml | 0 .../templates/serviceaccount.yaml | 0 .../helm/block-explorer/values.yaml | 0 {build => deploy}/helm/prism/.helmignore | 0 {build => deploy}/helm/prism/Chart.yaml | 0 .../helm/prism/templates/NOTES.txt | 0 .../helm/prism/templates/_helpers.tpl | 0 .../helm/prism/templates/deployment.yaml | 0 .../helm/prism/templates/hpa.yaml | 0 .../helm/prism/templates/ingress.yaml | 0 .../helm/prism/templates/service.yaml | 0 .../helm/prism/templates/serviceaccount.yaml | 0 .../templates/tests/test-connection.yaml | 0 {build => deploy}/helm/prism/values.yaml | 0 {build => deploy}/helm/sifnode/.helmignore | 0 {build => deploy}/helm/sifnode/Chart.yaml | 0 .../helm/sifnode/templates/NOTES.txt | 0 .../helm/sifnode/templates/_helpers.tpl | 0 .../templates/ebrelayer-deployment.yaml | 0 .../sifnode/templates/ebrelayer-secret.yaml | 0 .../sifnode/templates/serviceaccount.yaml | 0 .../sifnode/templates/sifnode-deployment.yaml | 0 .../sifnode/templates/sifnode-ingress.yaml | 0 .../helm/sifnode/templates/sifnode-pvc.yaml | 0 .../templates/sifnode-secret-ghcr.yaml | 0 .../sifnode/templates/sifnode-service.yaml | 0 .../templates/sifnodecli-deployment.yaml | 0 .../sifnode/templates/sifnodecli-pvc.yaml | 0 .../sifnode/templates/sifnodecli-service.yaml | 0 {build => deploy}/helm/sifnode/values.yaml | 0 {build => deploy}/helm/swagger-ui/.helmignore | 0 {build => deploy}/helm/swagger-ui/Chart.yaml | 0 .../helm/swagger-ui/templates/NOTES.txt | 0 .../helm/swagger-ui/templates/_helpers.tpl | 0 .../helm/swagger-ui/templates/deployment.yaml | 0 .../helm/swagger-ui/templates/hpa.yaml | 0 .../helm/swagger-ui/templates/ingress.yaml | 0 .../helm/swagger-ui/templates/service.yaml | 0 .../swagger-ui/templates/serviceaccount.yaml | 0 .../templates/tests/test-connection.yaml | 0 {build => deploy}/helm/swagger-ui/values.yaml | 0 {build/rakelib => deploy/rake}/chain.rake | 0 {build/rakelib => deploy/rake}/cluster.rake | 14 ++++++------- .../rakelib => deploy/rake}/dependencies.rake | 0 {build/rakelib => deploy/rake}/genesis.rake | 0 {build/rakelib => deploy/rake}/helpers.rake | 21 +++++++++++++++++++ {build/rakelib => deploy/rake}/validator.rake | 0 {build => deploy}/scripts/entrypoint.sh | 0 {build => deploy}/terraform/.gitignore | 0 .../terraform/providers/aws/main.tf | 0 .../terraform/providers/aws/outputs.tf | 0 .../terraform/providers/aws/variables.tf | 0 .../terraform/template/aws/.envrc.tpl | 0 .../terraform/template/aws/cluster.tf.tpl | 14 +++++++++---- .../terraform/template/az/cluster.tf.tpl | 0 .../terraform/template/gcp/cluster.tf.tpl | 0 75 files changed, 40 insertions(+), 32 deletions(-) delete mode 100644 build/lib/os.rb rename {build => deploy}/.gitkeep (100%) rename {build => deploy}/Gemfile (100%) rename {build => deploy}/Gemfile.lock (100%) rename {build => deploy}/genesis/Dockerfile (100%) rename {build => deploy}/genesis/docker-compose-ganache.yml (100%) rename {build => deploy}/genesis/docker-compose.yml (100%) rename {build => deploy}/helm/block-explorer/.gitignore (100%) rename {build => deploy}/helm/block-explorer/.helmignore (100%) rename {build => deploy}/helm/block-explorer/Chart.yaml (100%) rename {build => deploy}/helm/block-explorer/templates/NOTES.txt (100%) rename {build => deploy}/helm/block-explorer/templates/_helpers.tpl (100%) rename {build => deploy}/helm/block-explorer/templates/configmap-settings.yaml (100%) rename {build => deploy}/helm/block-explorer/templates/configmap-url.yaml (100%) rename {build => deploy}/helm/block-explorer/templates/deployment.yaml (100%) rename {build => deploy}/helm/block-explorer/templates/ingress.yaml (100%) rename {build => deploy}/helm/block-explorer/templates/rbac.yaml (100%) rename {build => deploy}/helm/block-explorer/templates/service.yaml (100%) rename {build => deploy}/helm/block-explorer/templates/serviceaccount.yaml (100%) rename {build => deploy}/helm/block-explorer/values.yaml (100%) rename {build => deploy}/helm/prism/.helmignore (100%) rename {build => deploy}/helm/prism/Chart.yaml (100%) rename {build => deploy}/helm/prism/templates/NOTES.txt (100%) rename {build => deploy}/helm/prism/templates/_helpers.tpl (100%) rename {build => deploy}/helm/prism/templates/deployment.yaml (100%) rename {build => deploy}/helm/prism/templates/hpa.yaml (100%) rename {build => deploy}/helm/prism/templates/ingress.yaml (100%) rename {build => deploy}/helm/prism/templates/service.yaml (100%) rename {build => deploy}/helm/prism/templates/serviceaccount.yaml (100%) rename {build => deploy}/helm/prism/templates/tests/test-connection.yaml (100%) rename {build => deploy}/helm/prism/values.yaml (100%) rename {build => deploy}/helm/sifnode/.helmignore (100%) rename {build => deploy}/helm/sifnode/Chart.yaml (100%) rename {build => deploy}/helm/sifnode/templates/NOTES.txt (100%) rename {build => deploy}/helm/sifnode/templates/_helpers.tpl (100%) rename {build => deploy}/helm/sifnode/templates/ebrelayer-deployment.yaml (100%) rename {build => deploy}/helm/sifnode/templates/ebrelayer-secret.yaml (100%) rename {build => deploy}/helm/sifnode/templates/serviceaccount.yaml (100%) rename {build => deploy}/helm/sifnode/templates/sifnode-deployment.yaml (100%) rename {build => deploy}/helm/sifnode/templates/sifnode-ingress.yaml (100%) rename {build => deploy}/helm/sifnode/templates/sifnode-pvc.yaml (100%) rename {build => deploy}/helm/sifnode/templates/sifnode-secret-ghcr.yaml (100%) rename {build => deploy}/helm/sifnode/templates/sifnode-service.yaml (100%) rename {build => deploy}/helm/sifnode/templates/sifnodecli-deployment.yaml (100%) rename {build => deploy}/helm/sifnode/templates/sifnodecli-pvc.yaml (100%) rename {build => deploy}/helm/sifnode/templates/sifnodecli-service.yaml (100%) rename {build => deploy}/helm/sifnode/values.yaml (100%) rename {build => deploy}/helm/swagger-ui/.helmignore (100%) rename {build => deploy}/helm/swagger-ui/Chart.yaml (100%) rename {build => deploy}/helm/swagger-ui/templates/NOTES.txt (100%) rename {build => deploy}/helm/swagger-ui/templates/_helpers.tpl (100%) rename {build => deploy}/helm/swagger-ui/templates/deployment.yaml (100%) rename {build => deploy}/helm/swagger-ui/templates/hpa.yaml (100%) rename {build => deploy}/helm/swagger-ui/templates/ingress.yaml (100%) rename {build => deploy}/helm/swagger-ui/templates/service.yaml (100%) rename {build => deploy}/helm/swagger-ui/templates/serviceaccount.yaml (100%) rename {build => deploy}/helm/swagger-ui/templates/tests/test-connection.yaml (100%) rename {build => deploy}/helm/swagger-ui/values.yaml (100%) rename {build/rakelib => deploy/rake}/chain.rake (100%) rename {build/rakelib => deploy/rake}/cluster.rake (93%) rename {build/rakelib => deploy/rake}/dependencies.rake (100%) rename {build/rakelib => deploy/rake}/genesis.rake (100%) rename {build/rakelib => deploy/rake}/helpers.rake (73%) rename {build/rakelib => deploy/rake}/validator.rake (100%) rename {build => deploy}/scripts/entrypoint.sh (100%) rename {build => deploy}/terraform/.gitignore (100%) rename {build => deploy}/terraform/providers/aws/main.tf (100%) rename {build => deploy}/terraform/providers/aws/outputs.tf (100%) rename {build => deploy}/terraform/providers/aws/variables.tf (100%) rename {build => deploy}/terraform/template/aws/.envrc.tpl (100%) rename {build => deploy}/terraform/template/aws/cluster.tf.tpl (74%) rename {build => deploy}/terraform/template/az/cluster.tf.tpl (100%) rename {build => deploy}/terraform/template/gcp/cluster.tf.tpl (100%) diff --git a/.gitignore b/.gitignore index a4edc669aa..cd564ac8e0 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,7 @@ frontend/.cache .DS_Store .testCoverage.txt .environments -build/networks +deploy/networks .env .backups .ssh diff --git a/Rakefile b/Rakefile index f29f127a3b..2741c2abf0 100644 --- a/Rakefile +++ b/Rakefile @@ -1,8 +1,8 @@ require "rake" require "yaml" require "digest" +require "rbconfig" -Dir["**/lib/*.rb"].each { |file| require_relative file } Dir["**/*.rake"].each do |path| Rake.add_rakelib(path&.split("/")&.reverse&.drop(1)&.reverse&.join("/")) end diff --git a/build/lib/os.rb b/build/lib/os.rb deleted file mode 100644 index 5136fe724a..0000000000 --- a/build/lib/os.rb +++ /dev/null @@ -1,19 +0,0 @@ -require 'rbconfig' - -def detect_os - @os ||= ( - host_os = RbConfig::CONFIG['host_os'] - case host_os - when /mswin|msys|mingw|cygwin|bccwin|wince|emc/ - :windows - when /darwin|mac os/ - :macosx - when /linux/ - :linux - when /solaris|bsd/ - :unix - else - raise Error::WebDriverError, "unknown os: #{host_os.inspect}" - end - ) -end diff --git a/build/.gitkeep b/deploy/.gitkeep similarity index 100% rename from build/.gitkeep rename to deploy/.gitkeep diff --git a/build/Gemfile b/deploy/Gemfile similarity index 100% rename from build/Gemfile rename to deploy/Gemfile diff --git a/build/Gemfile.lock b/deploy/Gemfile.lock similarity index 100% rename from build/Gemfile.lock rename to deploy/Gemfile.lock diff --git a/build/genesis/Dockerfile b/deploy/genesis/Dockerfile similarity index 100% rename from build/genesis/Dockerfile rename to deploy/genesis/Dockerfile diff --git a/build/genesis/docker-compose-ganache.yml b/deploy/genesis/docker-compose-ganache.yml similarity index 100% rename from build/genesis/docker-compose-ganache.yml rename to deploy/genesis/docker-compose-ganache.yml diff --git a/build/genesis/docker-compose.yml b/deploy/genesis/docker-compose.yml similarity index 100% rename from build/genesis/docker-compose.yml rename to deploy/genesis/docker-compose.yml diff --git a/build/helm/block-explorer/.gitignore b/deploy/helm/block-explorer/.gitignore similarity index 100% rename from build/helm/block-explorer/.gitignore rename to deploy/helm/block-explorer/.gitignore diff --git a/build/helm/block-explorer/.helmignore b/deploy/helm/block-explorer/.helmignore similarity index 100% rename from build/helm/block-explorer/.helmignore rename to deploy/helm/block-explorer/.helmignore diff --git a/build/helm/block-explorer/Chart.yaml b/deploy/helm/block-explorer/Chart.yaml similarity index 100% rename from build/helm/block-explorer/Chart.yaml rename to deploy/helm/block-explorer/Chart.yaml diff --git a/build/helm/block-explorer/templates/NOTES.txt b/deploy/helm/block-explorer/templates/NOTES.txt similarity index 100% rename from build/helm/block-explorer/templates/NOTES.txt rename to deploy/helm/block-explorer/templates/NOTES.txt diff --git a/build/helm/block-explorer/templates/_helpers.tpl b/deploy/helm/block-explorer/templates/_helpers.tpl similarity index 100% rename from build/helm/block-explorer/templates/_helpers.tpl rename to deploy/helm/block-explorer/templates/_helpers.tpl diff --git a/build/helm/block-explorer/templates/configmap-settings.yaml b/deploy/helm/block-explorer/templates/configmap-settings.yaml similarity index 100% rename from build/helm/block-explorer/templates/configmap-settings.yaml rename to deploy/helm/block-explorer/templates/configmap-settings.yaml diff --git a/build/helm/block-explorer/templates/configmap-url.yaml b/deploy/helm/block-explorer/templates/configmap-url.yaml similarity index 100% rename from build/helm/block-explorer/templates/configmap-url.yaml rename to deploy/helm/block-explorer/templates/configmap-url.yaml diff --git a/build/helm/block-explorer/templates/deployment.yaml b/deploy/helm/block-explorer/templates/deployment.yaml similarity index 100% rename from build/helm/block-explorer/templates/deployment.yaml rename to deploy/helm/block-explorer/templates/deployment.yaml diff --git a/build/helm/block-explorer/templates/ingress.yaml b/deploy/helm/block-explorer/templates/ingress.yaml similarity index 100% rename from build/helm/block-explorer/templates/ingress.yaml rename to deploy/helm/block-explorer/templates/ingress.yaml diff --git a/build/helm/block-explorer/templates/rbac.yaml b/deploy/helm/block-explorer/templates/rbac.yaml similarity index 100% rename from build/helm/block-explorer/templates/rbac.yaml rename to deploy/helm/block-explorer/templates/rbac.yaml diff --git a/build/helm/block-explorer/templates/service.yaml b/deploy/helm/block-explorer/templates/service.yaml similarity index 100% rename from build/helm/block-explorer/templates/service.yaml rename to deploy/helm/block-explorer/templates/service.yaml diff --git a/build/helm/block-explorer/templates/serviceaccount.yaml b/deploy/helm/block-explorer/templates/serviceaccount.yaml similarity index 100% rename from build/helm/block-explorer/templates/serviceaccount.yaml rename to deploy/helm/block-explorer/templates/serviceaccount.yaml diff --git a/build/helm/block-explorer/values.yaml b/deploy/helm/block-explorer/values.yaml similarity index 100% rename from build/helm/block-explorer/values.yaml rename to deploy/helm/block-explorer/values.yaml diff --git a/build/helm/prism/.helmignore b/deploy/helm/prism/.helmignore similarity index 100% rename from build/helm/prism/.helmignore rename to deploy/helm/prism/.helmignore diff --git a/build/helm/prism/Chart.yaml b/deploy/helm/prism/Chart.yaml similarity index 100% rename from build/helm/prism/Chart.yaml rename to deploy/helm/prism/Chart.yaml diff --git a/build/helm/prism/templates/NOTES.txt b/deploy/helm/prism/templates/NOTES.txt similarity index 100% rename from build/helm/prism/templates/NOTES.txt rename to deploy/helm/prism/templates/NOTES.txt diff --git a/build/helm/prism/templates/_helpers.tpl b/deploy/helm/prism/templates/_helpers.tpl similarity index 100% rename from build/helm/prism/templates/_helpers.tpl rename to deploy/helm/prism/templates/_helpers.tpl diff --git a/build/helm/prism/templates/deployment.yaml b/deploy/helm/prism/templates/deployment.yaml similarity index 100% rename from build/helm/prism/templates/deployment.yaml rename to deploy/helm/prism/templates/deployment.yaml diff --git a/build/helm/prism/templates/hpa.yaml b/deploy/helm/prism/templates/hpa.yaml similarity index 100% rename from build/helm/prism/templates/hpa.yaml rename to deploy/helm/prism/templates/hpa.yaml diff --git a/build/helm/prism/templates/ingress.yaml b/deploy/helm/prism/templates/ingress.yaml similarity index 100% rename from build/helm/prism/templates/ingress.yaml rename to deploy/helm/prism/templates/ingress.yaml diff --git a/build/helm/prism/templates/service.yaml b/deploy/helm/prism/templates/service.yaml similarity index 100% rename from build/helm/prism/templates/service.yaml rename to deploy/helm/prism/templates/service.yaml diff --git a/build/helm/prism/templates/serviceaccount.yaml b/deploy/helm/prism/templates/serviceaccount.yaml similarity index 100% rename from build/helm/prism/templates/serviceaccount.yaml rename to deploy/helm/prism/templates/serviceaccount.yaml diff --git a/build/helm/prism/templates/tests/test-connection.yaml b/deploy/helm/prism/templates/tests/test-connection.yaml similarity index 100% rename from build/helm/prism/templates/tests/test-connection.yaml rename to deploy/helm/prism/templates/tests/test-connection.yaml diff --git a/build/helm/prism/values.yaml b/deploy/helm/prism/values.yaml similarity index 100% rename from build/helm/prism/values.yaml rename to deploy/helm/prism/values.yaml diff --git a/build/helm/sifnode/.helmignore b/deploy/helm/sifnode/.helmignore similarity index 100% rename from build/helm/sifnode/.helmignore rename to deploy/helm/sifnode/.helmignore diff --git a/build/helm/sifnode/Chart.yaml b/deploy/helm/sifnode/Chart.yaml similarity index 100% rename from build/helm/sifnode/Chart.yaml rename to deploy/helm/sifnode/Chart.yaml diff --git a/build/helm/sifnode/templates/NOTES.txt b/deploy/helm/sifnode/templates/NOTES.txt similarity index 100% rename from build/helm/sifnode/templates/NOTES.txt rename to deploy/helm/sifnode/templates/NOTES.txt diff --git a/build/helm/sifnode/templates/_helpers.tpl b/deploy/helm/sifnode/templates/_helpers.tpl similarity index 100% rename from build/helm/sifnode/templates/_helpers.tpl rename to deploy/helm/sifnode/templates/_helpers.tpl diff --git a/build/helm/sifnode/templates/ebrelayer-deployment.yaml b/deploy/helm/sifnode/templates/ebrelayer-deployment.yaml similarity index 100% rename from build/helm/sifnode/templates/ebrelayer-deployment.yaml rename to deploy/helm/sifnode/templates/ebrelayer-deployment.yaml diff --git a/build/helm/sifnode/templates/ebrelayer-secret.yaml b/deploy/helm/sifnode/templates/ebrelayer-secret.yaml similarity index 100% rename from build/helm/sifnode/templates/ebrelayer-secret.yaml rename to deploy/helm/sifnode/templates/ebrelayer-secret.yaml diff --git a/build/helm/sifnode/templates/serviceaccount.yaml b/deploy/helm/sifnode/templates/serviceaccount.yaml similarity index 100% rename from build/helm/sifnode/templates/serviceaccount.yaml rename to deploy/helm/sifnode/templates/serviceaccount.yaml diff --git a/build/helm/sifnode/templates/sifnode-deployment.yaml b/deploy/helm/sifnode/templates/sifnode-deployment.yaml similarity index 100% rename from build/helm/sifnode/templates/sifnode-deployment.yaml rename to deploy/helm/sifnode/templates/sifnode-deployment.yaml diff --git a/build/helm/sifnode/templates/sifnode-ingress.yaml b/deploy/helm/sifnode/templates/sifnode-ingress.yaml similarity index 100% rename from build/helm/sifnode/templates/sifnode-ingress.yaml rename to deploy/helm/sifnode/templates/sifnode-ingress.yaml diff --git a/build/helm/sifnode/templates/sifnode-pvc.yaml b/deploy/helm/sifnode/templates/sifnode-pvc.yaml similarity index 100% rename from build/helm/sifnode/templates/sifnode-pvc.yaml rename to deploy/helm/sifnode/templates/sifnode-pvc.yaml diff --git a/build/helm/sifnode/templates/sifnode-secret-ghcr.yaml b/deploy/helm/sifnode/templates/sifnode-secret-ghcr.yaml similarity index 100% rename from build/helm/sifnode/templates/sifnode-secret-ghcr.yaml rename to deploy/helm/sifnode/templates/sifnode-secret-ghcr.yaml diff --git a/build/helm/sifnode/templates/sifnode-service.yaml b/deploy/helm/sifnode/templates/sifnode-service.yaml similarity index 100% rename from build/helm/sifnode/templates/sifnode-service.yaml rename to deploy/helm/sifnode/templates/sifnode-service.yaml diff --git a/build/helm/sifnode/templates/sifnodecli-deployment.yaml b/deploy/helm/sifnode/templates/sifnodecli-deployment.yaml similarity index 100% rename from build/helm/sifnode/templates/sifnodecli-deployment.yaml rename to deploy/helm/sifnode/templates/sifnodecli-deployment.yaml diff --git a/build/helm/sifnode/templates/sifnodecli-pvc.yaml b/deploy/helm/sifnode/templates/sifnodecli-pvc.yaml similarity index 100% rename from build/helm/sifnode/templates/sifnodecli-pvc.yaml rename to deploy/helm/sifnode/templates/sifnodecli-pvc.yaml diff --git a/build/helm/sifnode/templates/sifnodecli-service.yaml b/deploy/helm/sifnode/templates/sifnodecli-service.yaml similarity index 100% rename from build/helm/sifnode/templates/sifnodecli-service.yaml rename to deploy/helm/sifnode/templates/sifnodecli-service.yaml diff --git a/build/helm/sifnode/values.yaml b/deploy/helm/sifnode/values.yaml similarity index 100% rename from build/helm/sifnode/values.yaml rename to deploy/helm/sifnode/values.yaml diff --git a/build/helm/swagger-ui/.helmignore b/deploy/helm/swagger-ui/.helmignore similarity index 100% rename from build/helm/swagger-ui/.helmignore rename to deploy/helm/swagger-ui/.helmignore diff --git a/build/helm/swagger-ui/Chart.yaml b/deploy/helm/swagger-ui/Chart.yaml similarity index 100% rename from build/helm/swagger-ui/Chart.yaml rename to deploy/helm/swagger-ui/Chart.yaml diff --git a/build/helm/swagger-ui/templates/NOTES.txt b/deploy/helm/swagger-ui/templates/NOTES.txt similarity index 100% rename from build/helm/swagger-ui/templates/NOTES.txt rename to deploy/helm/swagger-ui/templates/NOTES.txt diff --git a/build/helm/swagger-ui/templates/_helpers.tpl b/deploy/helm/swagger-ui/templates/_helpers.tpl similarity index 100% rename from build/helm/swagger-ui/templates/_helpers.tpl rename to deploy/helm/swagger-ui/templates/_helpers.tpl diff --git a/build/helm/swagger-ui/templates/deployment.yaml b/deploy/helm/swagger-ui/templates/deployment.yaml similarity index 100% rename from build/helm/swagger-ui/templates/deployment.yaml rename to deploy/helm/swagger-ui/templates/deployment.yaml diff --git a/build/helm/swagger-ui/templates/hpa.yaml b/deploy/helm/swagger-ui/templates/hpa.yaml similarity index 100% rename from build/helm/swagger-ui/templates/hpa.yaml rename to deploy/helm/swagger-ui/templates/hpa.yaml diff --git a/build/helm/swagger-ui/templates/ingress.yaml b/deploy/helm/swagger-ui/templates/ingress.yaml similarity index 100% rename from build/helm/swagger-ui/templates/ingress.yaml rename to deploy/helm/swagger-ui/templates/ingress.yaml diff --git a/build/helm/swagger-ui/templates/service.yaml b/deploy/helm/swagger-ui/templates/service.yaml similarity index 100% rename from build/helm/swagger-ui/templates/service.yaml rename to deploy/helm/swagger-ui/templates/service.yaml diff --git a/build/helm/swagger-ui/templates/serviceaccount.yaml b/deploy/helm/swagger-ui/templates/serviceaccount.yaml similarity index 100% rename from build/helm/swagger-ui/templates/serviceaccount.yaml rename to deploy/helm/swagger-ui/templates/serviceaccount.yaml diff --git a/build/helm/swagger-ui/templates/tests/test-connection.yaml b/deploy/helm/swagger-ui/templates/tests/test-connection.yaml similarity index 100% rename from build/helm/swagger-ui/templates/tests/test-connection.yaml rename to deploy/helm/swagger-ui/templates/tests/test-connection.yaml diff --git a/build/helm/swagger-ui/values.yaml b/deploy/helm/swagger-ui/values.yaml similarity index 100% rename from build/helm/swagger-ui/values.yaml rename to deploy/helm/swagger-ui/values.yaml diff --git a/build/rakelib/chain.rake b/deploy/rake/chain.rake similarity index 100% rename from build/rakelib/chain.rake rename to deploy/rake/chain.rake diff --git a/build/rakelib/cluster.rake b/deploy/rake/cluster.rake similarity index 93% rename from build/rakelib/cluster.rake rename to deploy/rake/cluster.rake index 244d9f6651..7b17fc7b4a 100644 --- a/build/rakelib/cluster.rake +++ b/deploy/rake/cluster.rake @@ -54,7 +54,7 @@ namespace :cluster do task :swaggerui, [:chainnet, :provider, :namespace] do |t, args| check_args(args) - cmd = %Q{helm upgrade swagger-ui #{cwd}/../../build/helm/swagger-ui \ + cmd = %Q{helm upgrade swagger-ui #{cwd}/../../deploy/helm/swagger-ui \ --install -n #{ns(args)} --create-namespace \ } @@ -65,7 +65,7 @@ namespace :cluster do task :prism, [:chainnet, :provider, :namespace] do |t, args| check_args(args) - cmd = %Q{helm upgrade prism #{cwd}/../../build/helm/prism \ + cmd = %Q{helm upgrade prism #{cwd}/../../deploy/helm/prism \ --install -n #{ns(args)} --create-namespace \ } @@ -81,7 +81,7 @@ namespace :cluster do task :standalone, [:chainnet, :provider, :namespace, :image, :image_tag] do |t, args| check_args(args) - cmd = %Q{helm upgrade sifnode #{cwd}/../../build/helm/sifnode \ + cmd = %Q{helm upgrade sifnode #{cwd}/../../deploy/helm/sifnode \ --set sifnode.env.chainnet=#{args[:chainnet]} \ --install -n #{ns(args)} --create-namespace \ --set image.tag=#{image_tag(args)} \ @@ -95,7 +95,7 @@ namespace :cluster do task :peer, [:chainnet, :provider, :namespace, :image, :image_tag, :peer_address, :genesis_url] do |t, args| check_args(args) - cmd = %Q{helm upgrade sifnode #{cwd}/../../build/helm/sifnode \ + cmd = %Q{helm upgrade sifnode #{cwd}/../../deploy/helm/sifnode \ --install -n #{ns(args)} --create-namespace \ --set sifnode.env.chainnet=#{args[:chainnet]} \ --set sifnode.env.genesisURL=#{args[:genesis_url]} \ @@ -123,7 +123,7 @@ namespace :cluster do task :deploy, [:chainnet, :provider, :namespace, :image, :image_tag, :eth_websocket_address, :eth_bridge_registry_address, :eth_private_key, :moniker] do |t, args| check_args(args) - cmd = %Q{helm upgrade sifnode #{cwd}/../../build/helm/sifnode \ + cmd = %Q{helm upgrade sifnode #{cwd}/../../deploy/helm/sifnode \ --set sifnode.env.chainnet=#{args[:chainnet]} \ --install -n #{ns(args)} \ --set ebrelayer.image.repository=#{image_repository(args)} \ @@ -142,7 +142,7 @@ namespace :cluster do task :uninstall, [:chainnet, :provider, :namespace] do |t, args| check_args(args) - cmd = %Q{helm upgrade sifnode #{cwd}/../../build/helm/sifnode \ + cmd = %Q{helm upgrade sifnode #{cwd}/../../deploy/helm/sifnode \ --set sifnode.env.chainnet=#{args[:chainnet]} \ --install -n #{ns(args)} \ --set ebrelayer.enabled=false @@ -158,7 +158,7 @@ namespace :cluster do task :deploy, [:chainnet, :provider] do |t, args| check_args(args) - cmd = %Q{helm upgrade block-explorer ../build/helm/block-explorer \ + cmd = %Q{helm upgrade block-explorer ../deploy/helm/block-explorer \ --install -n block-explorer \ --create-namespace } diff --git a/build/rakelib/dependencies.rake b/deploy/rake/dependencies.rake similarity index 100% rename from build/rakelib/dependencies.rake rename to deploy/rake/dependencies.rake diff --git a/build/rakelib/genesis.rake b/deploy/rake/genesis.rake similarity index 100% rename from build/rakelib/genesis.rake rename to deploy/rake/genesis.rake diff --git a/build/rakelib/helpers.rake b/deploy/rake/helpers.rake similarity index 73% rename from build/rakelib/helpers.rake rename to deploy/rake/helpers.rake index e8f40966ab..473e3ee25a 100644 --- a/build/rakelib/helpers.rake +++ b/deploy/rake/helpers.rake @@ -58,3 +58,24 @@ def are_you_sure(args) exit(0) if input != 'y' end end + +# +# Detect the O/S +# +def detect_os + @os ||= ( + host_os = RbConfig::CONFIG['host_os'] + case host_os + when /mswin|msys|mingw|cygwin|bccwin|wince|emc/ + :windows + when /darwin|mac os/ + :macosx + when /linux/ + :linux + when /solaris|bsd/ + :unix + else + raise Error::WebDriverError, "unknown os: #{host_os.inspect}" + end + ) +end diff --git a/build/rakelib/validator.rake b/deploy/rake/validator.rake similarity index 100% rename from build/rakelib/validator.rake rename to deploy/rake/validator.rake diff --git a/build/scripts/entrypoint.sh b/deploy/scripts/entrypoint.sh similarity index 100% rename from build/scripts/entrypoint.sh rename to deploy/scripts/entrypoint.sh diff --git a/build/terraform/.gitignore b/deploy/terraform/.gitignore similarity index 100% rename from build/terraform/.gitignore rename to deploy/terraform/.gitignore diff --git a/build/terraform/providers/aws/main.tf b/deploy/terraform/providers/aws/main.tf similarity index 100% rename from build/terraform/providers/aws/main.tf rename to deploy/terraform/providers/aws/main.tf diff --git a/build/terraform/providers/aws/outputs.tf b/deploy/terraform/providers/aws/outputs.tf similarity index 100% rename from build/terraform/providers/aws/outputs.tf rename to deploy/terraform/providers/aws/outputs.tf diff --git a/build/terraform/providers/aws/variables.tf b/deploy/terraform/providers/aws/variables.tf similarity index 100% rename from build/terraform/providers/aws/variables.tf rename to deploy/terraform/providers/aws/variables.tf diff --git a/build/terraform/template/aws/.envrc.tpl b/deploy/terraform/template/aws/.envrc.tpl similarity index 100% rename from build/terraform/template/aws/.envrc.tpl rename to deploy/terraform/template/aws/.envrc.tpl diff --git a/build/terraform/template/aws/cluster.tf.tpl b/deploy/terraform/template/aws/cluster.tf.tpl similarity index 74% rename from build/terraform/template/aws/cluster.tf.tpl rename to deploy/terraform/template/aws/cluster.tf.tpl index 3ebcf425b3..dc712c8d2b 100644 --- a/build/terraform/template/aws/cluster.tf.tpl +++ b/deploy/terraform/template/aws/cluster.tf.tpl @@ -1,4 +1,7 @@ -// Manage state file with terraform cloud +// +// Uncomment to manage state with Terraform Cloud +// + // terraform { // backend "remote" { // hostname = "app.terraform.io" @@ -10,18 +13,21 @@ // } // } -// Manage state files with s3 +// +// Uncomment to manage state with AWS S3 +// + // terraform { // backend "s3" { // bucket = "" // key = "" // region = "us-west-1" // } -//} +// } // Sifchain terraform module module sifchain { - source = "github.com/sifchain/sifnode/build/terraform/providers/aws" + source = "github.com/sifchain/sifnode/deploy/terraform/providers/aws" region = "us-west-2" cluster_name = "sifchain-aws-{{.chainnet}}" tags = { diff --git a/build/terraform/template/az/cluster.tf.tpl b/deploy/terraform/template/az/cluster.tf.tpl similarity index 100% rename from build/terraform/template/az/cluster.tf.tpl rename to deploy/terraform/template/az/cluster.tf.tpl diff --git a/build/terraform/template/gcp/cluster.tf.tpl b/deploy/terraform/template/gcp/cluster.tf.tpl similarity index 100% rename from build/terraform/template/gcp/cluster.tf.tpl rename to deploy/terraform/template/gcp/cluster.tf.tpl