Skip to content

Latest commit

 

History

History
66 lines (50 loc) · 2.32 KB

README.develop.md

File metadata and controls

66 lines (50 loc) · 2.32 KB

The develop helper script

The script can build the image and push the code directly to a remote ucs-server.

Prerequisites

  1. An AppCenter app with a dummy-image

  2. A UCS-Server

  3. Configure simple, non-interactive ssh authentication i.e. with ssh-copy-id, ssh-add and Host in ~/.ssh/config

  4. Get the doveadm artifact

    1. Download from Gitlab with the helper-script It needs five variables, either as env-var or via .env-file.
    export GLDL_API_BASE_URL = 'https://git.knut.univention.de/api/v4'
    export GLDL_DL_PATH='python-doveadm.zip'
    export GLDL_PROJECT_ID='univention/customers/dataport/upx/python-doveadm'
    export GLDL_TOKEN="<secret-gitlab-access-token>"
    export GLDL_JOB_NAME="build-job"
    python3 get-artifact.py
    

    Optionally an alternate ca-cert-file can be used with:

    export GLDL_CA_PATH=''/etc/ssl/certs/ca-certificates.crt''
    
    1. Download from Gitlab with a Webbrowser Find the latest successful run off the main-branch, by clicking on Pipelines. Then click on the three dots and select "Download artifacts" -> "build-job:archive" Rename "build-job-build-stage-main.zip" to "python-doveadm.zip" and move it to the root of this repo.

    2. Build and zip it yourself

    cd python-doveadm
    ./build-builder.sh
    ./build-deb.sh
    cd dist/deb_dist/
    zip python-doveadm.zip doveadm_*.* python3-doveadm_*_all.deb
    mv python-doveadm.zip ../../../dovecot-connector
    

Configuration

  • Copy the develop.cfg.example to develop.cfg.
  • Set ucs_host in the file to the UCS-Server.
  • Install the sh python module with a minimum version of 1.13 See requirements.develop.txt!
  • Execute ./develop.py --help. All parameters shown can also be configured in the config-file.

Run

Open an ssh-root-shell to the ucs-server and execute tail --follow /var/log/univention/*.log /var/log/univention/listener_modules/*.log.

Execute ./develop.py all to deploy trigger and image.