Project

General

Profile

action #173935

Updated by JERiveraMoya about 1 month ago

#### Motivation 
 In the same way than for AutoYaST we cannot store the regcode in control version, so we need some mechanism to replace one or more variables, like the registration code in the jsonnet profile 

 #### Acceptance criteria 
 - **AC1**: Pass registration code to jsonnet files so we don't store the profiles with secrets. 

 #### Suggestions 
 The ideal option probably would be to use jsonnet as described in https://jsonnet.org/learning/tutorial.html (External variables), but we need to see availability of jsonnet package in workers, for example: 
 default_tw.json: 
 ``` 
 local lib = import 'library-ext.libsonnet'; 
 { 
   "product": { 
     "id": "Tumbleweed", 
     "registrationCode": std.extVar('registrationCode') 
   }, 
   "user": { 
     "fullName": "Bernhard M. Wiedemann", 
     "password": "nots3cr3t", 
     "userName": "bernhard" 
   }, 
   "root": { 
     "password": "nots3cr3t" 
   } 
 } 
 ``` 
 Then we run `jsonnet --ext-str registrationCode="111222" default_tw.json > default_tw_with_reg_code.json` workers.

Back