@leverege/build-tools 2.20.0 → 2.21.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/server/npm-scripts/postinstall.js +1 -0
- package/lib/server/repo-init/RepoInit.js +10 -9
- package/lib/server/repo-init/config.tgz +0 -0
- package/lib/server/repo-init/gitter/Gitter.js +12 -17
- package/lib/server/repo-init/templates/Templates.js +11 -10
- package/lib/web/npm-scripts/postinstall.js +1 -0
- package/package.json +3 -3
- package/src/helmup +35 -21
- package/src/npm-scripts/postinstall.js +2 -1
|
@@ -162,15 +162,16 @@ const start = async () => {
|
|
|
162
162
|
await gitter.build(buildSpec);
|
|
163
163
|
console.log(chalk.green.bold`
|
|
164
164
|
Repository setup complete.
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
`
|
|
165
|
+
` // chalk.green.bold`Still to work out:`,
|
|
166
|
+
// chalk.yellow`
|
|
167
|
+
// - figure out better approach for partial file read on transform
|
|
168
|
+
// - add / flesh out remaining templates
|
|
169
|
+
// - express-server
|
|
170
|
+
// - library
|
|
171
|
+
// - ui-lib
|
|
172
|
+
// - ui-???
|
|
173
|
+
// `
|
|
174
|
+
);
|
|
174
175
|
};
|
|
175
176
|
|
|
176
177
|
exports.start = start;
|
|
Binary file
|
|
@@ -75,10 +75,10 @@ class Gitter {
|
|
|
75
75
|
message: 'Where will the repository be hosted?',
|
|
76
76
|
choices: ['bitbucket', 'github', 'local']
|
|
77
77
|
}, {
|
|
78
|
-
type: '
|
|
78
|
+
type: 'input',
|
|
79
79
|
name: 'git.owner',
|
|
80
80
|
message: 'Who is the owner of the git repository?',
|
|
81
|
-
|
|
81
|
+
default: 'leverege',
|
|
82
82
|
when: answer => {
|
|
83
83
|
return answer.git.host !== 'local';
|
|
84
84
|
}
|
|
@@ -127,21 +127,16 @@ class Gitter {
|
|
|
127
127
|
const spinner = new Ora();
|
|
128
128
|
|
|
129
129
|
if (buildSpec.config.npmCheck) {
|
|
130
|
-
console.log(chalk.keyword('orange').bold(`
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
});
|
|
141
|
-
await execa('npm', ['run', 'npm-check-updates'], {
|
|
142
|
-
stdio: 'inherit'
|
|
143
|
-
}); // setup husky
|
|
144
|
-
|
|
130
|
+
// console.log( chalk.keyword( 'orange' ).bold( `
|
|
131
|
+
// Running npm-check-updates interactively to verify all of the package
|
|
132
|
+
// versions in package.json are up to date prior to committing everything.` ),
|
|
133
|
+
// chalk.yellow.bold( `
|
|
134
|
+
// Pay attention! You may be asked to answer Y/n if any are out of date!` )
|
|
135
|
+
// )
|
|
136
|
+
// spinner.start( 'Preparing for dependency checks prior to install.' )
|
|
137
|
+
// await pause( 3000 )
|
|
138
|
+
// spinner.succeed()
|
|
139
|
+
// setup husky
|
|
145
140
|
await execa('npm', ['install', 'husky', '--save-dev'], {
|
|
146
141
|
stdio: 'inherit'
|
|
147
142
|
});
|
|
@@ -53,7 +53,7 @@ class Templates {
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
needsAnIngestionPort(template) {
|
|
56
|
-
return template.type === 'ingestor' && template.subType !== 'PubSub';
|
|
56
|
+
return template.type === 'ingestor' && template.subType !== 'PubSub' && template.subType !== 'HTTP';
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
async runInquiry(spec) {
|
|
@@ -112,16 +112,17 @@ class Templates {
|
|
|
112
112
|
},
|
|
113
113
|
},
|
|
114
114
|
*/
|
|
115
|
+
// {
|
|
116
|
+
// type : 'confirm',
|
|
117
|
+
// name : 'template.helmify',
|
|
118
|
+
// message : 'Run helmify to generate Helm Charts?',
|
|
119
|
+
// default : false,
|
|
120
|
+
// when : ( answers ) => {
|
|
121
|
+
// const template = this.lookupTemplateByType( answers.template.type )
|
|
122
|
+
// return typeof template.helm !== 'undefined'
|
|
123
|
+
// },
|
|
124
|
+
// },
|
|
115
125
|
{
|
|
116
|
-
type: 'confirm',
|
|
117
|
-
name: 'template.helmify',
|
|
118
|
-
message: 'Run helmify to generate Helm Charts?',
|
|
119
|
-
default: true,
|
|
120
|
-
when: answers => {
|
|
121
|
-
const template = this.lookupTemplateByType(answers.template.type);
|
|
122
|
-
return typeof template.helm !== 'undefined';
|
|
123
|
-
}
|
|
124
|
-
}, {
|
|
125
126
|
type: 'list',
|
|
126
127
|
name: 'dotenv.logConfig',
|
|
127
128
|
message: 'Your preferred logging method (.env)?',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leverege/build-tools",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.21.0-beta.1",
|
|
4
4
|
"description": "A collection of build / support tools for Leverege developers",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"repository": {
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"inquirer": "^8.2.4",
|
|
65
65
|
"js-yaml": "^4.1.0",
|
|
66
66
|
"ncp": "^2.0.0",
|
|
67
|
-
"npm-registry-fetch": "^13.3.
|
|
67
|
+
"npm-registry-fetch": "^13.3.0",
|
|
68
68
|
"open": "^8.4.0",
|
|
69
69
|
"ora": "^5.4.1",
|
|
70
70
|
"parse-gitignore": "^2.0.0",
|
|
@@ -79,6 +79,6 @@
|
|
|
79
79
|
"@babel/node": "^7.18.10",
|
|
80
80
|
"@leverege/babel-preset-leverege-node": "^2.0.0",
|
|
81
81
|
"@leverege/eslint-config-leverege": "^3.0.1",
|
|
82
|
-
"npm": "^8.
|
|
82
|
+
"npm": "^8.17.0"
|
|
83
83
|
}
|
|
84
84
|
}
|
package/src/helmup
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
#
|
|
3
|
+
# This script is used to ease the pain of transition testing to chart museum
|
|
4
|
+
# for adding / updating deployments on a fluster.
|
|
1
5
|
#
|
|
2
6
|
# printf "\n***** RUNNING LOCALLY *****\n" && sleep 2
|
|
3
7
|
|
|
@@ -157,18 +161,32 @@ function installGrafana() {
|
|
|
157
161
|
function installRedis() {
|
|
158
162
|
showInstalling "Redis Network Cache"
|
|
159
163
|
addBitnamiRepo latest
|
|
160
|
-
[ -z "$REDIS_HELM_CHART" ] && REDIS_HELM_CHART="
|
|
164
|
+
[ -z "$REDIS_HELM_CHART" ] && REDIS_HELM_CHART="16" # latest breaks us => "v14+"
|
|
161
165
|
helm upgrade --install redis bitnami/redis \
|
|
162
166
|
--version $REDIS_HELM_CHART \
|
|
163
167
|
-f - <<REDIS_CHART_MODS
|
|
168
|
+
auth:
|
|
169
|
+
enabled: false
|
|
170
|
+
|
|
164
171
|
global:
|
|
165
172
|
storageClass: ssd
|
|
166
173
|
|
|
167
|
-
|
|
168
|
-
enabled:
|
|
169
|
-
|
|
174
|
+
metrics:
|
|
175
|
+
enabled: true
|
|
176
|
+
|
|
177
|
+
networkPolicy:
|
|
178
|
+
enabled: true
|
|
170
179
|
|
|
171
180
|
master:
|
|
181
|
+
persistence:
|
|
182
|
+
size: 8Gi # 8Gi is default
|
|
183
|
+
|
|
184
|
+
tolerations:
|
|
185
|
+
- key: "database"
|
|
186
|
+
operator: "Equal"
|
|
187
|
+
value: "true"
|
|
188
|
+
effect: "NoSchedule"
|
|
189
|
+
|
|
172
190
|
affinity:
|
|
173
191
|
nodeAffinity:
|
|
174
192
|
requiredDuringSchedulingIgnoredDuringExecution:
|
|
@@ -179,29 +197,25 @@ master:
|
|
|
179
197
|
values:
|
|
180
198
|
- database
|
|
181
199
|
|
|
200
|
+
replica:
|
|
201
|
+
persistence:
|
|
202
|
+
size: 8Gi # 8Gi is default
|
|
203
|
+
|
|
182
204
|
tolerations:
|
|
183
205
|
- key: "database"
|
|
184
206
|
operator: "Equal"
|
|
185
207
|
value: "true"
|
|
186
208
|
effect: "NoSchedule"
|
|
187
209
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
ingressNSMatchLabels:
|
|
198
|
-
redis: external
|
|
199
|
-
ingressNSPodMatchLabels:
|
|
200
|
-
redis-client: true
|
|
201
|
-
|
|
202
|
-
metrics:
|
|
203
|
-
enabled: true
|
|
204
|
-
|
|
210
|
+
affinity:
|
|
211
|
+
nodeAffinity:
|
|
212
|
+
requiredDuringSchedulingIgnoredDuringExecution:
|
|
213
|
+
nodeSelectorTerms:
|
|
214
|
+
- matchExpressions:
|
|
215
|
+
- key: target-env
|
|
216
|
+
operator: In
|
|
217
|
+
values:
|
|
218
|
+
- database
|
|
205
219
|
REDIS_CHART_MODS
|
|
206
220
|
if [[ $? -ne 0 ]];
|
|
207
221
|
then
|
|
@@ -6,11 +6,12 @@ const fs = require( 'fs' )
|
|
|
6
6
|
const untarConfigTarball = async ( subdir, tarball ) => {
|
|
7
7
|
if ( fs.existsSync( subdir ) ) {
|
|
8
8
|
process.chdir( subdir )
|
|
9
|
+
await execa( 'ls' )
|
|
9
10
|
await execa( 'tar', [ 'xf', tarball ] )
|
|
10
11
|
}
|
|
11
12
|
}
|
|
12
13
|
|
|
13
|
-
const awaiter = async ( subdir, tarball) => {
|
|
14
|
+
const awaiter = async ( subdir, tarball ) => {
|
|
14
15
|
await untarConfigTarball( subdir, tarball )
|
|
15
16
|
}
|
|
16
17
|
|