Skip to content

Commit

Permalink
[ChainOps] feature/build-rename (#280)
Browse files Browse the repository at this point in the history
* Ignore deploy/networks.

* Renamed build -> deploy.

* Tweaks/cleanup.
  • Loading branch information
_IM authored Nov 17, 2020
1 parent 6df5578 commit 84117c2
Show file tree
Hide file tree
Showing 75 changed files with 40 additions and 32 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ frontend/.cache
.DS_Store
.testCoverage.txt
.environments
build/networks
deploy/networks
.env
.backups
.ssh
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
@@ -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
19 changes: 0 additions & 19 deletions build/lib/os.rb

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 7 additions & 7 deletions build/rakelib/cluster.rake → deploy/rake/cluster.rake
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
}

Expand All @@ -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 \
}

Expand All @@ -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)} \
Expand All @@ -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]} \
Expand Down Expand Up @@ -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)} \
Expand All @@ -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
Expand All @@ -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
}
Expand Down
File renamed without changes.
File renamed without changes.
21 changes: 21 additions & 0 deletions build/rakelib/helpers.rake → deploy/rake/helpers.rake
Original file line number Diff line number Diff line change
Expand Up @@ -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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
// Manage state file with terraform cloud
//
// Uncomment to manage state with Terraform Cloud
//

// terraform {
// backend "remote" {
// hostname = "app.terraform.io"
Expand All @@ -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 = {
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 84117c2

Please sign in to comment.