|
@@ -14,7 +14,7 @@ const name = 'storage-node'
|
|
|
|
|
|
const wsProviderEndpointURI = config.require('wsProviderEndpointURI')
|
|
const wsProviderEndpointURI = config.require('wsProviderEndpointURI')
|
|
const queryNodeHost = config.require('queryNodeHost')
|
|
const queryNodeHost = config.require('queryNodeHost')
|
|
-const workerId = config.get('workerId') || '0'
|
|
|
|
|
|
+const workerId = config.require('workerId')
|
|
const accountURI = config.get('accountURI')
|
|
const accountURI = config.get('accountURI')
|
|
const keyFile = config.get('keyFile')
|
|
const keyFile = config.get('keyFile')
|
|
const lbReady = config.get('isLoadBalancerReady') === 'true'
|
|
const lbReady = config.get('isLoadBalancerReady') === 'true'
|
|
@@ -108,11 +108,11 @@ if (keyFile) {
|
|
).configName
|
|
).configName
|
|
|
|
|
|
const remoteKeyFilePath = '/joystream/key-file.json'
|
|
const remoteKeyFilePath = '/joystream/key-file.json'
|
|
- additionalParams = ['--keyFile', remoteKeyFilePath]
|
|
|
|
|
|
+ additionalParams.push(`--keyFile=${remoteKeyFilePath}`)
|
|
|
|
|
|
const passphrase = config.get('passphrase')
|
|
const passphrase = config.get('passphrase')
|
|
if (passphrase) {
|
|
if (passphrase) {
|
|
- additionalParams.push('--password', passphrase)
|
|
|
|
|
|
+ additionalParams.push(`--password=${passphrase}`)
|
|
}
|
|
}
|
|
|
|
|
|
additionalVolumes.push({
|
|
additionalVolumes.push({
|
|
@@ -150,6 +150,7 @@ const deployment = new k8s.apps.v1.Deployment(
|
|
name: 'colossus',
|
|
name: 'colossus',
|
|
image: colossusImage,
|
|
image: colossusImage,
|
|
imagePullPolicy: 'IfNotPresent',
|
|
imagePullPolicy: 'IfNotPresent',
|
|
|
|
+ workingDir: '/joystream/storage-node-v2',
|
|
env: [
|
|
env: [
|
|
{
|
|
{
|
|
name: 'WS_PROVIDER_ENDPOINT_URI',
|
|
name: 'WS_PROVIDER_ENDPOINT_URI',
|
|
@@ -172,6 +173,7 @@ const deployment = new k8s.apps.v1.Deployment(
|
|
name: 'WORKER_ID',
|
|
name: 'WORKER_ID',
|
|
value: workerId,
|
|
value: workerId,
|
|
},
|
|
},
|
|
|
|
+ // ACCOUNT_URI takes precedence over keyFile
|
|
{
|
|
{
|
|
name: 'ACCOUNT_URI',
|
|
name: 'ACCOUNT_URI',
|
|
value: accountURI,
|
|
value: accountURI,
|
|
@@ -190,6 +192,22 @@ const deployment = new k8s.apps.v1.Deployment(
|
|
},
|
|
},
|
|
...additionalVolumeMounts,
|
|
...additionalVolumeMounts,
|
|
],
|
|
],
|
|
|
|
+ command: ['yarn'],
|
|
|
|
+ args: [
|
|
|
|
+ 'storage-node',
|
|
|
|
+ 'server',
|
|
|
|
+ '--worker',
|
|
|
|
+ workerId,
|
|
|
|
+ '--port=3333',
|
|
|
|
+ '--uploads=/data',
|
|
|
|
+ '--sync',
|
|
|
|
+ '--syncInterval=1',
|
|
|
|
+ '--queryNodeEndpoint',
|
|
|
|
+ queryNodeHost,
|
|
|
|
+ '--apiUrl',
|
|
|
|
+ wsProviderEndpointURI,
|
|
|
|
+ ...additionalParams,
|
|
|
|
+ ],
|
|
ports: [{ containerPort: colossusPort }],
|
|
ports: [{ containerPort: colossusPort }],
|
|
},
|
|
},
|
|
],
|
|
],
|