News

collecting_society: Major Upgrade

Added by Alexander Blum about 2 months ago

Changes

Finally our software received a mayor version upgrade.

Upgrade

In order to upgrade your local setup, perform the following commands:

  1. Upgrading to current versions of docker (20.10.9) and docker-compose (2.0.1)
    are highly recommended, especially docker-compose >= 2 (parallel builds are quite faster).
    For a debian based OS with the source repository already added:

    docker --version
    apt-get install --only-upgrade docker-ce docker-ce-cli containerd.io
    docker --version
    
    docker-compose --version
    rm /usr/local/bin/docker-compose
    mkdir -p /usr/local/lib/docker/cli-plugins
    curl -SL https://github.com/docker/compose/releases/download/v2.0.1/docker-compose-linux-x86_64 \
        -o /usr/local/lib/docker/cli-plugins/docker-compose
    chmod +x /usr/local/lib/docker/cli-plugins/docker-compose
    ln -s /usr/local/lib/docker/cli-plugins/docker-compose /usr/local/bin/docker-compose
    docker-compose --version
    
    # note, that the dash between `docker` and `compose` is not needed anymore
    docker compose --version
    
  2. Stop all running services

    docker compose down
    docker compose -f docker-compose.testing.yml down
    docker compose -f docker-compose.documentation.yml down
    
  3. Delete all *.pyc files

    cd PATH/TO/REPO
    find . -name \*.pyc -delete
    
  4. Delete the volumes

    sudo rm -rf \
        volumes/echoprint-data \
        volumes/postgresql-data \
        volumes/trytond-files
    docker volume rm \
        collecting_society_test_echoprint_data \
        collecting_society_test_postgresql_data \
        collecting_society_test_trytond_files
    
  5. If you upgraded from docker-compose 1 -> 2, you might want to delete the old images, too,
    as the new build system won't save the intermediate image cache as normal images.
    WARNING: The following command will delete all images. If you use docker with other projects,
    don't use this method!

    docker container prune
    docker image prune -a -f
    
  6. Build the images/database and start the services

    git pull
    ./project update
    docker compose build
    ./db-rebuild
    docker compose up
    
  7. Install the new tryton client and test the connection. You can also connect to the test portal, just ask for the password.

There might be several problems with the procedure or the software after this upgrade,
so please contact us or create a ticket, if anything unexpected happens.

collecting_society: Repo Restructuring

Added by Thomas Mielke 8 months ago

In order to sync your local repos, for all collecting_society_* repos (+archiving, +portal) enter these commands to rename the current dev branch (form 'develop' to 'development'):

git branch -m develop development # <-- note: old name 'develop' may vary for certain repos
git fetch origin
git branch -u origin/development development
git remote set-head origin -a

Check that the repo actually was on branch 'develop'. The default branch of collecting_society_worker was actually 'master'. See https://github.com/C3S to see the changes.

This is the complete list of affected repos:

  • collecting_society_docker
  • portal_web
  • collecting_society_worker
  • collecting_society_web
  • archiving
  • portal
  • collecting_society

echoprint-server is currently not affected to maintain the branches before the fork from Spotify.

Note that there has also been some renaming of scripts and config files.

A container rebuild is highly recommended.

If you run into any trouble, reach out to Alex or Thomas.

collecting_society: DB Update Necessary ...

Added by Thomas Mielke about 1 year ago

The LocationSpace model got a name field:

https://github.com/C3S/collecting_society/commit/92ed0ac4a63a7584732bbf0dc5a11cd0cc3155bc#diff-4d0dfa13081e3abafdab0861463bb911R3132

Location is now almost finished, including location spaces. Check out the menu item on the 'Licensee' tab.

What's missing is the contact mechanisms (I didn't figure out how to write the values) and Country/Subsection (as we don't have any in our database). Code review welcome:

https://github.com/C3S/collecting_society_web/commit/e8dcfb7ee35f21d7d5fae4bf74823f6ad8c79a57

collecting_society: db rebuild / .env update needed

Added by Alexander Blum almost 2 years ago

  • The missing views for the licensing db models have been added
  • A new .env var TRYTON_DEMODATA_DEBUG has been added to be able to control the amount of created demodata without changing the repository files. 0 means all data, 1 means about 1 object for each model, etc
  • The trytond tests for the module collecting_society (views, depends, scenario doctest of collecting_society/tests/scenario_collecting_society.rst) have been added to the ./scripts/test script and are now covered by jenkins as well. They might now also be run via docker-compose run --rm erpserver execute run-tests erpserver

collecting_society: Docker Container for EchoPrint Server

Added by Thomas Mielke about 2 years ago

We now have a Docker Container for the EchoPrint Server: Please have a look at the .env.example file and add ECHOPRINT_* environment variables. Also add the four new entries in the [echoprint] section of the collecting_society_worker's config.ini. Then do a docker-compose build. Finally try scripts/test to see EchoPrint in action.

(1-9/9)

Also available in: Atom