Skip to content

Commit

Permalink
[Scripts] Fix release (#4147)
Browse files Browse the repository at this point in the history
* Revert "release only starcoin"

This reverts commit 62ebf79.

* kube: Update loadbalance manifest

* Fix node selector

* Update argument
  • Loading branch information
sanlee42 authored Jul 2, 2024
1 parent 6f48e48 commit bed5324
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 40 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/release_asset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,14 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: build
args: --manifest-path=./cmd/starcoin/Cargo.toml --release
args: --release

- name: build starcoin release asset
run: bash ./scripts/release.sh ${{ matrix.platform }}

- name: build mpm release asset
run: bash ./scripts/release_mpm.sh ${{ matrix.platform }}

- name: upload artifact asset
uses: actions/upload-artifact@v2
if: ${{ github.event_name != 'release'}}
Expand Down
24 changes: 0 additions & 24 deletions kube/manifest/service-vega.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@ spec:
apiVersion: v1
kind: Service
metadata:
labels:
app: starcoin
network: vega
statefulset.kubernetes.io/pod-name: starcoin-0
annotations:
service.beta.kubernetes.io/do-loadbalancer-enable-proxy-protocol: "true"
name: starcoin-0
namespace: starcoin-vega
spec:
Expand Down Expand Up @@ -67,12 +61,6 @@ spec:
apiVersion: v1
kind: Service
metadata:
labels:
app: starcoin
network: vega
statefulset.kubernetes.io/pod-name: starcoin-1
annotations:
service.beta.kubernetes.io/do-loadbalancer-enable-proxy-protocol: "true"
name: starcoin-1
namespace: starcoin-vega
spec:
Expand Down Expand Up @@ -106,12 +94,6 @@ spec:
apiVersion: v1
kind: Service
metadata:
labels:
app: starcoin
network: vega
statefulset.kubernetes.io/pod-name: starcoin-2
annotations:
service.beta.kubernetes.io/do-loadbalancer-enable-proxy-protocol: "true"
name: starcoin-2
namespace: starcoin-vega
spec:
Expand Down Expand Up @@ -145,12 +127,6 @@ spec:
apiVersion: v1
kind: Service
metadata:
labels:
app: starcoin
network: vega
statefulset.kubernetes.io/pod-name: starcoin-3
annotations:
service.beta.kubernetes.io/do-loadbalancer-enable-proxy-protocol: "true"
name: starcoin-3
namespace: starcoin-vega
spec:
Expand Down
16 changes: 1 addition & 15 deletions kube/manifest/starcoin-vega.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ spec:
app: starcoin
network: vega
spec:
nodeSelector:
starcoin/node-pool: seed-pool
containers:
- name: starcoin
image: ghcr.io/starcoinorg/starcoin:v2.0.0
Expand All @@ -36,7 +34,7 @@ spec:
if [ ! -z $node_key ]; then
node_key_flag="--node-key ${node_key}";
fi;
/starcoin/starcoin -n vega --discover-local true --disable-miner-client false --p2prpc-default-global-api-quota 9000/s --p2prpc-custom-user-api-quota get_header_by_hash=9000/s --p2prpc-custom-user-api-quota get_headers_by_hash=9000/s --p2prpc-custom-user-api-quota info=9000/s --p2prpc-custom-user-api-quota get_block_by_hash=9000/s --p2prpc-custom-user-api-quota get_block_ids=9000/s --p2prpc-custom-user-api-quota get_blocks=9000/s --jsonrpc-default-global-api-quota 9000/s --jsonrpc-custom-user-api-quota chain.get_headers_by_hash=9000/s --jsonrpc-custom-user-api-quota chain.get_header_by_hash=9000/s --jsonrpc-custom-user-api-quota chain.info=9000/s --jsonrpc-custom-user-api-quota chain.get_block_by_hash=9000/s --jsonrpc-custom-user-api-quota chain.get_block_ids=9000/s --jsonrpc-custom-user-api-quota chain.get_blocks=9000/s --min-peers-to-propagate 512 --max-peers-to-propagate 1024 --max-outgoing-peers 512 --max-incoming-peers 512 -d /sc-data $node_key_flag;
/starcoin/starcoin -n vega --discover-local true --disable-miner-client false --miner-thread 3 --p2prpc-default-global-api-quota 9000/s --p2prpc-custom-user-api-quota get_header_by_hash=9000/s --p2prpc-custom-user-api-quota get_headers_by_hash=9000/s --p2prpc-custom-user-api-quota info=9000/s --p2prpc-custom-user-api-quota get_block_by_hash=9000/s --p2prpc-custom-user-api-quota get_block_ids=9000/s --p2prpc-custom-user-api-quota get_blocks=9000/s --jsonrpc-default-global-api-quota 9000/s --jsonrpc-custom-user-api-quota chain.get_headers_by_hash=9000/s --jsonrpc-custom-user-api-quota chain.get_header_by_hash=9000/s --jsonrpc-custom-user-api-quota chain.info=9000/s --jsonrpc-custom-user-api-quota chain.get_block_by_hash=9000/s --jsonrpc-custom-user-api-quota chain.get_block_ids=9000/s --jsonrpc-custom-user-api-quota chain.get_blocks=9000/s --min-peers-to-propagate 512 --max-peers-to-propagate 1024 --max-outgoing-peers 512 --max-incoming-peers 512 -d /sc-data $node_key_flag;
ports:
- containerPort: 9840
hostPort: 9840
Expand All @@ -61,18 +59,6 @@ spec:
timeoutSeconds: 2
failureThreshold: 4
successThreshold: 1
readinessProbe:
exec:
command:
- sh
- -c
- >-
/starcoin/starcoin -n vega -d /sc-data node sync status|grep Synchronized
initialDelaySeconds: 10
periodSeconds: 5
timeoutSeconds: 2
failureThreshold: 3
successThreshold: 1
volumeClaimTemplates:
- metadata:
name: starcoin-volume
Expand Down
7 changes: 7 additions & 0 deletions scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
rm -rf starcoin-artifacts/*
mkdir -p starcoin-artifacts/
cp -v target/release/starcoin starcoin-artifacts/
cp -v target/release/starcoin_miner starcoin-artifacts/
cp -v target/release/starcoin_generator starcoin-artifacts/
cp -v target/release/mpm starcoin-artifacts/
cp -v target/release/starcoin_txfactory starcoin-artifacts/
cp -v target/release/starcoin_db_exporter starcoin-artifacts/
cp -v scripts/import_block.sh starcoin-artifacts/
cp -v scripts/verify_header.sh starcoin-artifacts/
cp -v README.md starcoin-artifacts/
if [ "$1" == "windows-latest" ]; then
7z a -r starcoin-$1.zip starcoin-artifacts
Expand Down

0 comments on commit bed5324

Please sign in to comment.