Skip to content

Commit 3b3c015

Browse files
author
_IM
authored
[ChainOps] feature/build-rename (#280)
* Ignore deploy/networks. * Renamed build -> deploy. * Tweaks/cleanup.
1 parent ecf29af commit 3b3c015

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+40
-32
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ frontend/.cache
88
.DS_Store
99
.testCoverage.txt
1010
.environments
11-
build/networks
11+
deploy/networks
1212
.env
1313
.backups
1414
.ssh

Rakefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
require "rake"
22
require "yaml"
33
require "digest"
4+
require "rbconfig"
45

5-
Dir["**/lib/*.rb"].each { |file| require_relative file }
66
Dir["**/*.rake"].each do |path|
77
Rake.add_rakelib(path&.split("/")&.reverse&.drop(1)&.reverse&.join("/"))
88
end

build/lib/os.rb

-19
This file was deleted.

build/.gitkeep deploy/.gitkeep

File renamed without changes.

build/Gemfile deploy/Gemfile

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.

build/rakelib/cluster.rake deploy/rake/cluster.rake

+7-7
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ namespace :cluster do
5454
task :swaggerui, [:chainnet, :provider, :namespace] do |t, args|
5555
check_args(args)
5656

57-
cmd = %Q{helm upgrade swagger-ui #{cwd}/../../build/helm/swagger-ui \
57+
cmd = %Q{helm upgrade swagger-ui #{cwd}/../../deploy/helm/swagger-ui \
5858
--install -n #{ns(args)} --create-namespace \
5959
}
6060

@@ -65,7 +65,7 @@ namespace :cluster do
6565
task :prism, [:chainnet, :provider, :namespace] do |t, args|
6666
check_args(args)
6767

68-
cmd = %Q{helm upgrade prism #{cwd}/../../build/helm/prism \
68+
cmd = %Q{helm upgrade prism #{cwd}/../../deploy/helm/prism \
6969
--install -n #{ns(args)} --create-namespace \
7070
}
7171

@@ -81,7 +81,7 @@ namespace :cluster do
8181
task :standalone, [:chainnet, :provider, :namespace, :image, :image_tag] do |t, args|
8282
check_args(args)
8383

84-
cmd = %Q{helm upgrade sifnode #{cwd}/../../build/helm/sifnode \
84+
cmd = %Q{helm upgrade sifnode #{cwd}/../../deploy/helm/sifnode \
8585
--set sifnode.env.chainnet=#{args[:chainnet]} \
8686
--install -n #{ns(args)} --create-namespace \
8787
--set image.tag=#{image_tag(args)} \
@@ -95,7 +95,7 @@ namespace :cluster do
9595
task :peer, [:chainnet, :provider, :namespace, :image, :image_tag, :peer_address, :genesis_url] do |t, args|
9696
check_args(args)
9797

98-
cmd = %Q{helm upgrade sifnode #{cwd}/../../build/helm/sifnode \
98+
cmd = %Q{helm upgrade sifnode #{cwd}/../../deploy/helm/sifnode \
9999
--install -n #{ns(args)} --create-namespace \
100100
--set sifnode.env.chainnet=#{args[:chainnet]} \
101101
--set sifnode.env.genesisURL=#{args[:genesis_url]} \
@@ -123,7 +123,7 @@ namespace :cluster do
123123
task :deploy, [:chainnet, :provider, :namespace, :image, :image_tag, :eth_websocket_address, :eth_bridge_registry_address, :eth_private_key, :moniker] do |t, args|
124124
check_args(args)
125125

126-
cmd = %Q{helm upgrade sifnode #{cwd}/../../build/helm/sifnode \
126+
cmd = %Q{helm upgrade sifnode #{cwd}/../../deploy/helm/sifnode \
127127
--set sifnode.env.chainnet=#{args[:chainnet]} \
128128
--install -n #{ns(args)} \
129129
--set ebrelayer.image.repository=#{image_repository(args)} \
@@ -142,7 +142,7 @@ namespace :cluster do
142142
task :uninstall, [:chainnet, :provider, :namespace] do |t, args|
143143
check_args(args)
144144

145-
cmd = %Q{helm upgrade sifnode #{cwd}/../../build/helm/sifnode \
145+
cmd = %Q{helm upgrade sifnode #{cwd}/../../deploy/helm/sifnode \
146146
--set sifnode.env.chainnet=#{args[:chainnet]} \
147147
--install -n #{ns(args)} \
148148
--set ebrelayer.enabled=false
@@ -158,7 +158,7 @@ namespace :cluster do
158158
task :deploy, [:chainnet, :provider] do |t, args|
159159
check_args(args)
160160

161-
cmd = %Q{helm upgrade block-explorer ../build/helm/block-explorer \
161+
cmd = %Q{helm upgrade block-explorer ../deploy/helm/block-explorer \
162162
--install -n block-explorer \
163163
--create-namespace
164164
}
File renamed without changes.
File renamed without changes.

build/rakelib/helpers.rake deploy/rake/helpers.rake

+21
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,24 @@ def are_you_sure(args)
5858
exit(0) if input != 'y'
5959
end
6060
end
61+
62+
#
63+
# Detect the O/S
64+
#
65+
def detect_os
66+
@os ||= (
67+
host_os = RbConfig::CONFIG['host_os']
68+
case host_os
69+
when /mswin|msys|mingw|cygwin|bccwin|wince|emc/
70+
:windows
71+
when /darwin|mac os/
72+
:macosx
73+
when /linux/
74+
:linux
75+
when /solaris|bsd/
76+
:unix
77+
else
78+
raise Error::WebDriverError, "unknown os: #{host_os.inspect}"
79+
end
80+
)
81+
end
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

build/terraform/template/aws/cluster.tf.tpl deploy/terraform/template/aws/cluster.tf.tpl

+10-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
// Manage state file with terraform cloud
1+
//
2+
// Uncomment to manage state with Terraform Cloud
3+
//
4+
25
// terraform {
36
// backend "remote" {
47
// hostname = "app.terraform.io"
@@ -10,18 +13,21 @@
1013
// }
1114
// }
1215

13-
// Manage state files with s3
16+
//
17+
// Uncomment to manage state with AWS S3
18+
//
19+
1420
// terraform {
1521
// backend "s3" {
1622
// bucket = ""
1723
// key = ""
1824
// region = "us-west-1"
1925
// }
20-
//}
26+
// }
2127

2228
// Sifchain terraform module
2329
module sifchain {
24-
source = "github.com/sifchain/sifnode/build/terraform/providers/aws"
30+
source = "github.com/sifchain/sifnode/deploy/terraform/providers/aws"
2531
region = "us-west-2"
2632
cluster_name = "sifchain-aws-{{.chainnet}}"
2733
tags = {

0 commit comments

Comments
 (0)