1
0
mirror of https://github.com/e107inc/e107.git synced 2025-10-28 12:16:03 +01:00
Files
php-e107/e107_tests/lib/ci/salt
Nick Liu 8a6919f2a3 ci: Workaround for https://github.com/saltstack/relenv/issues/182
relenv version 0.16.0 bundled with SaltStack 3007.1 has a bug that
prevents the installation of the PyPI package "mysqlclient".

This change applies a known workaround to enable the package to
install in the Salt minion onedir.
2025-01-03 19:20:24 +01:00
..

e107 Local Test Container Setup

  1. Launch a development container:

    lxc launch -s local images:ubuntu/focal e107-dev
    
  2. Push your public SSH key:

    lxc file push --uid 0 --gid 0 -pv ~/.ssh/id_rsa.pub e107-dev/root/.ssh/authorized_keys
    
  3. Install OpenSSH Server:

    lxc exec e107-dev -- apt install -y openssh-server
    
  4. Note the IP of the container:

    E107_DEV_HOST=$(lxc exec e107-dev -- hostname -I | cut -d' ' -f1)
    
  5. Generate the Salt SSH roster:

    echo "e107-dev: $E107_DEV_HOST" | tee roster
    
  6. Configure e107_tests/config.yml based on e107_tests/config.sample.yml (from the root of this repository).

    For all tests:

    Set db.dbname, db.user, and db.password to what you want the container configuration to have.

    Set db.host to the value of $E107_DEV_HOST.

    For acceptance tests:

    Set deployer to sftp.

    Set fs.host to the value of $E107_DEV_HOST.

    Set fs.user to www-data.

    Set fs.password to any password you want the user to have.

    Set fs.path to /var/www/html/e107/.

    Set url to the output of echo "http://$E107_DEV_HOST/e107/"

  7. Apply the container configuration:

    salt-ssh 'e107-dev' --state-output=changes state.apply e107-dev