Skip to content

Commit

Permalink
6.0 consensus chart refactor (#3951)
Browse files Browse the repository at this point in the history
* refactor consensus chart for flux compatiblity
  • Loading branch information
jgreat authored Apr 4, 2024
1 parent 39cdbb2 commit 39fbbda
Show file tree
Hide file tree
Showing 41 changed files with 664 additions and 960 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/mobilecoin-dev-cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
#########################################
# Build binaries
########################################
#########################################
build-rust-hardware-projects:
needs:
- generate-metadata
Expand Down Expand Up @@ -191,7 +191,7 @@ jobs:

- name: Get enclave MRSIGNER/MRENCLAVE values
id: enclave
uses: mobilecoinofficial/gh-actions/enclave-measurements@ad6f1f0f1594c7afd159ab4c92b2f5aa7a738a08
uses: mobilecoinofficial/gh-actions/enclave-measurements@v0
with:
enclave_so_path: ${{ env.RUST_ARTIFACTS_PATH }}/${{ matrix.enclave }}

Expand Down Expand Up @@ -221,16 +221,17 @@ jobs:
if: steps.go_cache.outputs.cache-hit != 'true'
shell: bash
run: |
mkdir -p ${GO_ARTIFACTS_PATH}
mkdir -p "${GO_ARTIFACTS_PATH}"
pushd go-grpc-gateway
./install_tools.sh
./build.sh
popd
cp go-grpc-gateway/go-grpc-gateway ${GO_ARTIFACTS_PATH}
cp go-grpc-gateway/go-grpc-gateway "${GO_ARTIFACTS_PATH}"
- name: check artifacts
shell: bash
run: |
ls -alR ${GO_ARTIFACTS_PATH}
ls -alR "${GO_ARTIFACTS_PATH}"
- name: Upload Artifacts
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -327,11 +328,8 @@ jobs:
matrix:
chart:
- consensus-node
- consensus-node-config
- fog-ingest
- fog-test-client
- mc-core-common-config
- mc-core-dev-env-setup
- mobilecoind
- watcher
- fog-report
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/mobilecoin-dispatch-dev-mainnet-fog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ jobs:
configMap:
enabled: true
database: recovery
EOF
- name: Generate fog-ingest-config values
run: |
Expand All @@ -138,6 +139,7 @@ jobs:
enabled: true
password: '${{ secrets.DEV_POSTGRESQL_FOG_RECOVERY_PASSWORD }}'
database: recovery
EOF
- name: Deploy core-common-config setup
uses: mobilecoinofficial/gha-k8s-toolbox@v1
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/mobilecoin-dispatch-dev-testnet-fog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ jobs:
configMap:
enabled: true
database: recovery
EOF
- name: Generate fog-ingest-config values
run: |
Expand All @@ -138,6 +139,7 @@ jobs:
enabled: true
password: '${{ secrets.DEV_POSTGRESQL_FOG_RECOVERY_PASSWORD }}'
database: recovery
EOF
- name: Deploy core-common-config setup
uses: mobilecoinofficial/gha-k8s-toolbox@v1
Expand Down
13 changes: 5 additions & 8 deletions .github/workflows/mobilecoin-workflow-dev-bootstrap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,16 @@ jobs:
for i in 1 2 3
do
aws s3 cp --only-show-errors --recursive --acl public-read \
"s3://${BUCKET}/prebuilt/${VERSION}/chain/node${i}" \
"s3://${BUCKET}/node${i}.${NAMESPACE}.development.mobilecoin.com" &
"s3://${BUCKET}/prebuilt/${VERSION}/chain/node${i}" \
"s3://${BUCKET}/node${i}.${NAMESPACE}.development.mobilecoin.com" &
# capture pids
pids[${i}]=$!
pids[i]=$!
done
# wait for all pids to finish
for pid in ${pids[*]}
for pid in "${pids[@]}"
do
wait ${pid}
wait "${pid}"
done
setup-environment:
Expand All @@ -81,9 +81,6 @@ jobs:
- reset
with:
namespace: ${{ inputs.namespace }}
block_version: ${{ inputs.block_version }}
chart_repo: ${{ inputs.chart_repo }}
version: ${{ inputs.version }}
secrets: inherit

# We now have a db with setup-environment
Expand Down
42 changes: 28 additions & 14 deletions .github/workflows/mobilecoin-workflow-dev-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ on:
type: string
required: true
minimum_block:
description: "The minimum block height before the enviroment is ready"
description: "The minimum block height before the environment is ready"
type: string
required: false
default: "500"
Expand All @@ -57,10 +57,7 @@ jobs:
setup-environment:
uses: ./.github/workflows/mobilecoin-workflow-dev-setup-environment.yaml
with:
block_version: ${{ inputs.block_version }}
chart_repo: ${{ inputs.chart_repo }}
namespace: ${{ inputs.namespace }}
version: ${{ inputs.version }}
secrets: inherit

consensus-deploy:
Expand All @@ -69,24 +66,36 @@ jobs:
runs-on: mcf-dev-small-x64
strategy:
matrix:
release_name:
- consensus-node-1
- consensus-node-2
- consensus-node-3
release:
- name: consensus-node-1
instance: 1
- name: consensus-node-2
instance: 2
- name: consensus-node-3
instance: 3
steps:
# use values file because intel.com/sgx is hard to escape on the --set option.
- name: Generate consensus-node values file
run: |
mkdir -p "${VALUES_BASE_PATH}"
cat <<EOF > "${VALUES_BASE_PATH}/consensus-node-values.yaml"
image:
org: ${{ inputs.docker_image_org }}
global:
certManagerClusterIssuer: google-public-ca
mobilecoin:
network: ${{ inputs.namespace }}
partner: dev
node:
config:
clientHostname: node${{ matrix.release.instance }}.${{ inputs.namespace }}.development.mobilecoin.com
peerHostname: peer${{ matrix.release.instance }}.${{ inputs.namespace }}.development.mobilecoin.com
blockVersion: ${{ inputs.block_version }}
persistence:
enabled: false
ingress:
common:
tls:
clusterIssuer: google-public-ca
clientAttest:
rateLimits:
enabled: false
Expand All @@ -101,7 +110,7 @@ jobs:
chart_version: ${{ inputs.version }}
chart_values: ${{ env.VALUES_BASE_PATH }}/consensus-node-values.yaml
chart_wait_timeout: 10m
release_name: ${{ matrix.release_name }}
release_name: ${{ matrix.release.name }}
namespace: ${{ inputs.namespace }}
rancher_cluster: ${{ secrets.DEV_RANCHER_CLUSTER }}
rancher_url: ${{ secrets.DEV_RANCHER_URL }}
Expand Down Expand Up @@ -174,6 +183,7 @@ jobs:
externalSecrets:
signingCert:
name: fog-report-signing-cert-a
EOF
- name: Deploy fog-report-a
uses: mobilecoinofficial/gha-k8s-toolbox@v1
Expand Down Expand Up @@ -219,6 +229,7 @@ jobs:
externalSecrets:
signingCert:
name: fog-report-signing-cert-b
EOF
- name: Deploy fog-report-b
uses: mobilecoinofficial/gha-k8s-toolbox@v1
Expand Down Expand Up @@ -264,6 +275,7 @@ jobs:
enabled: false
tls:
clusterIssuer: google-public-ca
EOF
- name: Deploy fog-view
uses: mobilecoinofficial/gha-k8s-toolbox@v1
Expand Down Expand Up @@ -310,6 +322,7 @@ jobs:
enabled: false
tls:
clusterIssuer: google-public-ca
EOF
- name: Deploy fog-ledger
Expand Down Expand Up @@ -342,6 +355,7 @@ jobs:
mobilecoin:
network: ${{ inputs.namespace }}
partner: dev
EOF
- name: Deploy fog-ingest
uses: mobilecoinofficial/[email protected]
Expand Down
Loading

0 comments on commit 39fbbda

Please sign in to comment.