@milaboratories/pl-deployments 1.1.7 → 1.1.9

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/src/ssh/pl.ts CHANGED
@@ -9,7 +9,7 @@ import * as plpath from './pl_paths';
9
9
  import { getDefaultPlVersion } from '../common/pl_version';
10
10
 
11
11
  import net from 'net';
12
- import type { SshPlConfigGenerationResult } from '@milaboratories/pl-config';
12
+ import type { PlLicenseMode, SshPlConfigGenerationResult } from '@milaboratories/pl-config';
13
13
  import { generateSshPlConfigs, getFreePort } from '@milaboratories/pl-config';
14
14
  import { supervisorStatus, supervisorStop as supervisorCtlShutdown, generateSupervisordConfig, supervisorCtlStart } from './supervisord';
15
15
 
@@ -98,8 +98,8 @@ export class SshPl {
98
98
  return true;
99
99
  }
100
100
 
101
- public async platformaInit(localWorkdir: string): Promise<SshInitReturnTypes> {
102
- const state: PlatformaInitState = { localWorkdir };
101
+ public async platformaInit(ops: SshPlConfig): Promise<SshInitReturnTypes> {
102
+ const state: PlatformaInitState = { localWorkdir: ops.localWorkdir };
103
103
 
104
104
  try {
105
105
  state.arch = await this.getArch();
@@ -115,7 +115,7 @@ export class SshPl {
115
115
  }
116
116
 
117
117
  const downloadRes = await this.downloadBinariesAndUploadToTheServer(
118
- localWorkdir, state.remoteHome, state.arch,
118
+ ops.localWorkdir, state.remoteHome, state.arch,
119
119
  );
120
120
  state.binPaths = { ...downloadRes, history: undefined };
121
121
  state.downloadedBinaries = downloadRes.history;
@@ -142,9 +142,7 @@ export class SshPl {
142
142
  minioLocal: state.ports.minioPort.local,
143
143
  },
144
144
  },
145
- licenseMode: {
146
- type: 'env',
147
- },
145
+ licenseMode: ops.license,
148
146
  });
149
147
  state.generatedConfig = { ...config, filesToCreate: { skipped: 'it is too wordy' } };
150
148
 
@@ -428,6 +426,11 @@ export type SshPlatformaPorts = {
428
426
 
429
427
  type Arch = { platform: string; arch: string };
430
428
 
429
+ export type SshPlConfig = {
430
+ localWorkdir: string;
431
+ license: PlLicenseMode;
432
+ }
433
+
431
434
  export type SshInitReturnTypes = {
432
435
  plUser: string;
433
436
  plPassword: string;