Skip to content

Commit

Permalink
upgrades
Browse files Browse the repository at this point in the history
saltstack-salt to use same file as bootstrap script
  • Loading branch information
kiemlicz committed Oct 30, 2024
1 parent 51d2892 commit 13eda86
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 14 deletions.
10 changes: 5 additions & 5 deletions config/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# used by install.py
pip~=23.3.2
cffi==1.14.6
pip~=24.3.1
cffi==1.16.0
six~=1.16.0
# pykeepass~=4.0.0 # to be removed after sdb://kdbx/ removal
gdrive~=0.1.5
Expand All @@ -9,9 +9,9 @@ jinja2~=3.1.2 # jinja2~=2.11.3
#pygit2==1.6.1
pygit2==1.10.1
# Needed for Salt API
pyOpenSSL~=23.2.0
CherryPy~=18.6.1
cryptography~=41.0.7
pyOpenSSL~=24.0.0
CherryPy~=18.8.0
cryptography==42.0.5
M2Crypto~=0.38.0
docker~=5.0.3 # required to setup salt in docker
MarkupSafe~=2.1.2 # https://github.com/saltstack/salt/issues/61666
6 changes: 3 additions & 3 deletions installer/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
] # , f"config/ambassador-installer.override.conf" ### FIXME ADD THIS OVERRIDE SINCE IT WILL BE FILTERED OUT if not exists
BASE_OS = "debian"
BASE_OS_RELEASE = "bookworm"
SALT_DOWNLOAD_URL = "https://bootstrap.saltproject.io"
SALT_DOWNLOAD_URL = "https://github.com/saltstack/salt-bootstrap/releases/latest/download/bootstrap-salt.sh"

"""
If running in VM, ensure that NIC promisc mode works
Expand Down Expand Up @@ -135,7 +135,7 @@
HAS_OCI_LIBS = False

salt_version = args.salt_ver
secrets = args.secrets # rename to `secrets`
secrets = args.secrets
configs = args.configs
where_to = args.to
extra = args.extra
Expand Down Expand Up @@ -250,7 +250,7 @@ def add_lxc_rootfs(mapping_tuple):
map(lambda f: add_lxc_rootfs(f), files_to_transfer())
)

log.info("Provisioning LXC, inspect logs carefully since LXC doesn't forward exceptions")
log.info("Provisioning LXC, inspect logs carefully since LXC doesn't forward exceptions") # return code is always -1
prepare_files(container_name)
ambassador_lxc.attach_wait(requisites, ([], REQUIRED_PKGS[BASE_OS]))
ambassador_lxc.attach_wait(install)
Expand Down
2 changes: 1 addition & 1 deletion installer/utils/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def requisite_commands(required_pkgs: List[str], required_pip: List[str]) -> Lis
def salt_download_and_install_commands(
start_daemon: bool = True,
salt_version: str = None,
bootstrap_url="https://bootstrap.saltproject.io"
bootstrap_url="https://github.com/saltstack/salt-bootstrap/releases/latest/download/bootstrap-salt.sh"
) -> List[str]:
"""
Executing list of commands instead of programmatic download to have common base for docker and other deployments
Expand Down
2 changes: 1 addition & 1 deletion installer/utils/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def assert_ret_code(command: Union[List[str], str], env: Dict[str, str] = None)
command = join_commands(command)
completion = subprocess.run(command, shell=True, env=env)
if completion.returncode:
raise RuntimeError(f"Command {command} failed with result: {completion}")
raise RuntimeError(f"ERROR!\nCommand {command} failed with result: {completion}\n")


def remove_comment(line: str) -> str:
Expand Down
1 change: 1 addition & 0 deletions salt/kubernetes/fluxcd/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ fluxcd_bootstrap:
- env: {{ kubernetes.fluxcd.bootstrap_envs|tojson }}
- require:
- cmd: fluxcd_cli
# todo add sops secret creation
2 changes: 1 addition & 1 deletion salt/minion/map.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
},
'Debian': {
'name': "deb http://repo.saltstack.com/py3/debian/10/amd64/latest buster main",
'file': '/etc/apt/sources.list.d/saltstack.list',
'file': '/etc/apt/sources.list.d/salt.list',
'key_url': "https://repo.saltstack.com/py3/debian/10/amd64/latest/SALTSTACK-GPG-KEY.pub",
'pkg': "salt-minion",
'health_file': "/tmp/salt/healthz",
Expand Down
6 changes: 3 additions & 3 deletions salt/salt/map.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{% set salt_installer = salt['grains.filter_by']({
'default': {
'repository': {
'file': "/etc/apt/sources.list.d/saltstack.list",
'file': "/etc/apt/sources.list.d/salt.list",
},
'master': {
'config': [],
Expand All @@ -17,12 +17,12 @@
'config': [],
'port': 9191,
'pkg_name': "salt-api",
'file': "/etc/apt/sources.list.d/saltstack.list",
'file': "/etc/apt/sources.list.d/salt.list",
},
'ssh': {
'config': [],
'pkg_name': "salt-ssh",
'file': "/etc/apt/sources.list.d/saltstack.list",
'file': "/etc/apt/sources.list.d/salt.list",
}
},
}, merge=salt['grains.filter_by']({
Expand Down

0 comments on commit 13eda86

Please sign in to comment.