Skip to content
This repository has been archived by the owner on Dec 7, 2021. It is now read-only.

Commit

Permalink
Merge pull request #27 from ethersphere/globalstore
Browse files Browse the repository at this point in the history
Staging: Add new swarm cluster that uses a global-store
  • Loading branch information
skylenet authored Feb 13, 2019
2 parents bc5df74 + 0ba1bab commit 0d754aa
Show file tree
Hide file tree
Showing 7 changed files with 154 additions and 1 deletion.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
STAGING_PUBLIC_REPLICAS=10
STAGING_PRIVATE_REPLICAS=30
STAGING_PRIVATE_GS_REPLICAS=5
6 changes: 6 additions & 0 deletions .travis/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ HELMSMAN="helmsman -no-banner -no-ns -no-fancy"
kubectl config use-context staging
PUBLIC_OLD_VERSION=$(kubectl -n staging get sts swarm-public -o jsonpath="{.metadata.resourceVersion}")
PRIVATE_OLD_VERSION=$(kubectl -n staging get sts swarm-private -o jsonpath="{.metadata.resourceVersion}")
PRIVATE_GS_OLD_VERSION=$(kubectl -n staging get sts swarm-private-gs -o jsonpath="{.metadata.resourceVersion}")

# Perform updates
for e in *.yaml
Expand All @@ -18,6 +19,7 @@ done
kubectl config use-context staging
PUBLIC_NEW_VERSION=$(kubectl -n staging get sts swarm-public -o jsonpath="{.metadata.resourceVersion}")
PRIVATE_NEW_VERSION=$(kubectl -n staging get sts swarm-private -o jsonpath="{.metadata.resourceVersion}")
PRIVATE_GS_NEW_VERSION=$(kubectl -n staging get sts swarm-private-gs -o jsonpath="{.metadata.resourceVersion}")

if [ "$PUBLIC_OLD_VERSION" != "$PUBLIC_NEW_VERSION" ]; then
kubectl -n staging delete pods -l release=swarm-public,app=swarm,component=swarm
Expand All @@ -26,3 +28,7 @@ fi
if [ "$PRIVATE_OLD_VERSION" != "$PRIVATE_NEW_VERSION" ]; then
kubectl -n staging delete pods -l release=swarm-private,app=swarm-private,component=swarm
fi

if [ "$PRIVATE_GS_OLD_VERSION" != "$PRIVATE_GS_NEW_VERSION" ]; then
kubectl -n staging delete pods -l release=swarm-private-gs,app=swarm-private,component=swarm
fi
41 changes: 41 additions & 0 deletions staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,44 @@ apps:
set:
smoke.config.swarmReplicas: "$STAGING_PRIVATE_REPLICAS"
wait: false
# Private cluster with global-store
private-global-store:
tillerNamespace: "staging"
namespace: "staging"
name: "swarm-private-global-store"
enabled: true
chart: "ethersphere/swarm-global-store"
version: "0.0.1"
description: "(Private) Swarm global store"
valuesFiles:
- "staging/private-global-store.yaml"
wait: true
priority: -3
private-swarm-gs:
tillerNamespace: "staging"
namespace: "staging"
name: "swarm-private-gs"
enabled: true
chart: "ethersphere/swarm-private"
version: "0.0.2"
description: "(Private) Swarm staging cluster using global-store"
valuesFiles:
- "staging/private-swarm-gs.yaml"
- "staging/swarm-version.yaml"
- "staging/swarm-bootnode-version.yaml"
set:
swarm.replicaCount: "$STAGING_PRIVATE_GS_REPLICAS"
wait: true
timeout: 600
private-smoke-gs-110:
tillerNamespace: "staging"
namespace: "staging"
name: "private-smoke-gs-110"
enabled: true
chart: "ethersphere/smoke"
version: "0.0.2"
description: "(Private) Smoke test: Upload and sync 110KB"
valuesFile: "staging/private-smoke-gs-110.yaml"
set:
smoke.config.swarmReplicas: "$STAGING_PRIVATE_GS_REPLICAS"
wait: false
22 changes: 22 additions & 0 deletions staging/private-global-store.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
globalstore:
image:
repository: ethdevops/swarm-global-store
tag: edge
imagePullPolicy: Always
config:
extraFlags:
- "--verbosity=3"
persistence:
diskEnabled: true
pvc:
enabled: true
accessMode: ReadWriteOnce
size: 30Gi
storageClass: gp2
resources:
requests:
memory: 2Gi
cpu: 0.3
limits:
memory: 4Gi
cpu: 0.5
13 changes: 13 additions & 0 deletions staging/private-smoke-gs-110.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
smoke:
schedule: "*/5 * * * *"
config:
name: "upload-sync-110-30"
prefix: "swarm-private-gs"
suffix: "swarm-private-gs-headless"
operation: "upload_and_sync"
influxdbEndpoint: "http://swarm-private-gs-influxdb:8086"
extraFlags:
- --single
- --filesize=110
- --sync-delay=30
- --http-port=8500
71 changes: 71 additions & 0 deletions staging/private-swarm-gs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
swarm:
metricsEnabled: true
tracingEnabled: false
profilingEnabled: false
terminationGracePeriodSeconds: 5
imagePullPolicy: IfNotPresent
podManagementPolicy: Parallel
updateStrategy:
type: "OnDelete"
config:
ens_api: http://mainnet-geth-geth.geth:8545
verbosity: 4
debug: true
maxpeers: 25
bzznetworkid: 3
storesize: "5000000" # 5000000 * 4KB = 20GB
extraFlags:
- --ws
- --wsaddr=0.0.0.0
- --wsorigins=localhost
- --wsapi=admin,net,debug,bzz
- --globalstore-api=ws://swarm-private-global-store-swarm-global-store:3033
secrets:
password: qwerty
ingress:
domain: stg.swarm-gateways.net
enabled: true
tls:
enabled: true
acmeEnabled: false
annotations:
nginx.ingress.kubernetes.io/proxy-body-size: 500m
nginx.ingress.kubernetes.io/ssl-redirect: "false"
persistence:
enabled: true
size: 30Gi
storageClass: gp2
resources:
requests:
memory: 512Mi
cpu: 0.1
limits:
memory: 1024Mi
cpu: 0.3

influxdb:
resources:
requests:
memory: 256Mi
cpu: 0.1
limits:
memory: 8Gi
cpu: 4
persistence:
enabled: true
size: 40Gi
storageClass: gp2

grafana:
datasources:
datasources.yaml:
apiVersion: 1
datasources:
- name: metrics
type: influxdb
url: http://swarm-private-gs-influxdb:8086
database: metrics
user: swarm
password: swarm
access: proxy
isDefault: true
1 change: 0 additions & 1 deletion staging/private-swarm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ swarm:
podManagementPolicy: Parallel
updateStrategy:
type: "OnDelete"
replicaCount: 30
config:
ens_api: http://mainnet-geth-geth.geth:8545
verbosity: 4
Expand Down

0 comments on commit 0d754aa

Please sign in to comment.