Skip to content

Salt 3008 migration - #643

Open
RobHooper wants to merge 5 commits into
mainfrom
salt3008
Open

Salt 3008 migration#643
RobHooper wants to merge 5 commits into
mainfrom
salt3008

Conversation

@RobHooper

Copy link
Copy Markdown
Contributor

Resolves #491

@RobHooper RobHooper self-assigned this Aug 21, 2026
Comment thread salt/apache/init.sls
apache2 dependencies:
pip.installed:
- names:
- saltext-apache

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Salt Apache and MySQL extensions both require a fair chunk of memory to install. The install only completed in my testing after increasing to 5GBs memory (2GB RAM, 3GB Swap).
ocp20 will fail to install this extension without increasing Swap.

I propose setting a Swap to a minimum of 4GB on all servers.

https://github.com/open-contracting/deploy/blob/main/salt/core/swap.sls

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure this needs to be installed on the server and not just where the salt-ssh client is running?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes the extension is needed only on the server - this is a mistake I made starting this task, I had installed the extensions on my local system and was then puzzled why they would not take effect.
This makes sense because of how Salt works, it compiles our states, uploads itself to the server, executes and then reports back the result.
Because the code is not executed locally, the local environment does not matter.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aha, ok to increase swap space

Comment thread salt/core/init.sls
pip:
pkg.installed:
- pkgs:
- python3-pip

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Installing pip as part of the core install. It is already on all but two servers, moving to salt-extensions will install it everywhere regardless.

Comment thread salt/core/init.sls
Comment on lines +26 to +28
- build-essential
- python3-dev
- install_recommends: False

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to review what is required.
Build-essential is needed for the Salt extensions to compile but may not be needed everywhere, it is a bulky package and I only want to install it if I need it.

L28 - install_recommends install build-essential and python3-dev so should be removed from here if we are installing them anyway.

@RobHooper

Copy link
Copy Markdown
Contributor Author

Todo before review + deployment:

  • Replace webutil
  • Test deployment with data before applying to live servers (deploying after database is already made etc)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Salt 3008 migration

2 participants