def task__iso_render_bootstrap() -> types.TaskDict: """Generate the bootstrap script.""" return helper.TemplateFile( source=constants.ROOT / 'scripts' / 'bootstrap.sh.in', destination=constants.ISO_ROOT / 'bootstrap.sh', context={ 'VERSION': constants.SHORT_VERSION }, file_dep=[constants.VERSION_FILE], task_dep=['_iso_mkdir_root'], ).task
), destination_directory=constants.ISO_ROOT, task_dep=['_iso_mkdir_root'] ), helper.FileTree( basename='_iso_add_tree', files=( Path('iso-manager.sh'), Path('downgrade.sh'), Path('upgrade.sh'), Path('solution-manager.sh'), Path('backup.sh'), helper.TemplateFile( task_name='bootstrap.sh', source=constants.ROOT/'scripts'/'bootstrap.sh.in', destination=constants.ISO_ROOT/'bootstrap.sh', context={'VERSION': versions.VERSION}, file_dep=[versions.VERSION_FILE], task_dep=['_iso_mkdir_root'], ), helper.TemplateFile( task_name='restore.sh', source=constants.ROOT/'scripts'/'restore.sh.in', destination=constants.ISO_ROOT/'restore.sh', context={'VERSION': versions.VERSION}, file_dep=[versions.VERSION_FILE], task_dep=['_iso_mkdir_root'], ), helper.SerializedData( task_name='product.txt', destination=constants.ISO_ROOT/'product.txt', data={
"""Generate the nginx configuration.""" with Path(self.targets[0]).open('w', encoding='utf-8') as fp: parts = container_registry.create_config(self._img_root, self._srv_root, self._name_pfx) for part in parts: fp.write(part) PILLAR_FILES: Tuple[Union[Path, targets.AtomicTarget], ...] = ( Path('pillar/metalk8s/roles/minion.sls'), targets.TemplateFile( task_name='bootstrap.sls', source=constants.ROOT / 'pillar' / 'metalk8s' / 'roles' / 'bootstrap.sls.in', destination=constants.ISO_ROOT / 'pillar' / 'metalk8s' / 'roles' / 'bootstrap.sls', context={'VERSION': constants.SHORT_VERSION}, file_dep=[constants.VERSION_FILE], ), Path('pillar/metalk8s/roles/ca.sls'), Path('pillar/metalk8s/roles/etcd.sls'), Path('pillar/metalk8s/roles/master.sls'), Path('pillar/metalk8s/roles/node.sls'), targets.TemplateFile( task_name='top.sls', source=constants.ROOT / 'pillar' / 'top.sls.in', destination=constants.ISO_ROOT / 'pillar' / 'top.sls', context={'VERSION': constants.SHORT_VERSION}, file_dep=[constants.VERSION_FILE], ),
with_constants=False, ) return parts PILLAR_FILES: Tuple[Union[Path, targets.AtomicTarget], ...] = ( Path('pillar/metalk8s/roles/bootstrap.sls'), Path('pillar/metalk8s/roles/ca.sls'), Path('pillar/metalk8s/roles/etcd.sls'), Path('pillar/metalk8s/roles/master.sls'), Path('pillar/metalk8s/roles/minion.sls'), Path('pillar/metalk8s/roles/node.sls'), targets.TemplateFile( task_name='top.sls', source=constants.ROOT / 'pillar' / 'top.sls.in', destination=constants.ISO_ROOT / 'pillar' / 'top.sls', context={'VERSION': versions.VERSION}, file_dep=[versions.VERSION_FILE], ), ) OPERATOR_YAML_ROOT: Path = constants.ROOT / 'storage-operator/deploy' VOLUME_CRD: Path = OPERATOR_YAML_ROOT / 'crds/storage_v1alpha1_volume_crd.yaml' OPERATOR_ACCOUNT: Path = OPERATOR_YAML_ROOT / 'service_account.yaml' OPERATOR_ROLE: Path = OPERATOR_YAML_ROOT / 'role.yaml' OPERATOR_ROLEBINDING: Path = OPERATOR_YAML_ROOT / 'role_binding.yaml' OPERATOR_DEPLOYMENT: Path = OPERATOR_YAML_ROOT / 'operator.yaml' # List of salt files to install.