Skip to content

Commit

Permalink
chore: Update the staging bootstrap for the latest IC version
Browse files Browse the repository at this point in the history
  • Loading branch information
sasa-tomic committed Nov 25, 2022
1 parent 03c2b9d commit f9c8b65
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dashboard/docker-compose.jabberwocky.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ services:
- GITLAB_API_TOKEN_RELEASE
- GITLAB_API_TOKEN_IC_PUBLIC
- LOCAL_REGISTRY_PATH=/registry_cache
- NNS_URL=http://[2600:3004:1200:1200:5000:7dff:fe29:a2f5]:8080
- NNS_URL=http://[2600:3004:1200:1200:5000:11ff:fe37:c55d]:8080
- NETWORK=staging
- RUST_BACKTRACE=1
volumes:
Expand Down
2 changes: 1 addition & 1 deletion dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"scripts": {
"dev-staging": "concurrently \"yarn start\" \"yarn start-backend\" \"yarn start-rust-backend-staging\"",
"start-rust-backend-staging": "cd ../rs && BACKEND_PORT=8081 RUST_BACKTRACE=1 NETWORK=staging NNS_URL=http://[2600:3004:1200:1200:5000:7dff:fe29:a2f5]:8080 cargo watch -C ic-management-backend -x run --ignore .local_registry",
"start-rust-backend-staging": "cd ../rs && BACKEND_PORT=8081 RUST_BACKTRACE=1 NETWORK=staging NNS_URL=http://[2600:3004:1200:1200:5000:11ff:fe37:c55d]:8080 cargo watch -C ic-management-backend -x run --ignore .local_registry",
"dev-mainnet": "concurrently \"yarn start\" \"yarn start-backend\" \"yarn start-rust-backend-mainnet\"",
"start-rust-backend-mainnet": "cd ../rs && RUST_BACKTRACE=1 NETWORK=mainnet NNS_URL=https://ic0.app cargo watch -C ic-management-backend -x run --ignore .local_registry",
"dev": "concurrently \"yarn start\" \"yarn start-backend\" \"yarn start-rust-backend-staging\" \"yarn start-rust-backend-mainnet\"",
Expand Down
11 changes: 10 additions & 1 deletion pylib/ic_deployment.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,21 @@
class IcDeployment:
"""Interface with the deployment Ansible configuration, e.g. get nodes, ipv6 addresses, etc."""

def __init__(self, deployment_name: str, nodes_filter_include: str = "", decentralized_deployment=False):
def __init__(
self,
deployment_name: str,
nodes_filter_include: str = "",
nns_url_override: str = "",
decentralized_deployment=False,
):
"""Create an object for the given git repo root and deployment name."""
self._name = deployment_name
if deployment_name == "staging" and not nodes_filter_include:
nodes_filter_include = "node_type=(child_nns|app_[0-9]+)"
self._deployment_env_root = find_deployment_env_root(deployment_name)
self._inventory_script = self._deployment_env_root.parent.parent / "ansible/inventory/inventory.py"
self.nodes_filter_include = nodes_filter_include
self.nns_url_override = nns_url_override
self.decentralized_deployment = decentralized_deployment

@property
Expand Down Expand Up @@ -92,6 +99,8 @@ def get_deployment_nodes_hostvars(self):

def get_nns_url(self):
"""Get the NNS nodes for a deployment."""
if self.nns_url_override:
return self.nns_url_override
if self.name in ["mercury", "mainnet"]:
return "https://ic0.app/"
nns_nodes = self.get_deployment_subnet_nodes("nns")
Expand Down
2 changes: 1 addition & 1 deletion rs/cli/src/ic_admin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ impl Cli {
// But since ic-admin expects these commands to include the "get-" prefix, we
// need to add it back Example:
// `release_cli get subnet 0` becomes
// `ic-admin --nns-url "http://[2600:3004:1200:1200:5000:7dff:fe29:a2f5]:8080" get-subnet 0`
// `ic-admin --nns-url "http://[2600:3004:1200:1200:5000:11ff:fe37:c55d]:8080" get-subnet 0`
let mut args_with_get_prefix = vec![String::from("get-") + args[0].as_str()];
args_with_get_prefix.extend_from_slice(args.split_at(1).1);
args_with_get_prefix
Expand Down

0 comments on commit f9c8b65

Please sign in to comment.