Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker: provide a quick-setup that avoids the need for installer.pl #255

Closed
bschmalhofer opened this issue Jul 27, 2020 · 4 comments
Closed
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@bschmalhofer
Copy link
Contributor

bschmalhofer commented Jul 27, 2020

This would be useful for development and for continous integration.

See also https://hub.docker.com/r/juanluisbaptiste/otrs.
I expect that https://github.com/OTRS/module-tools already provides support for such a feature.

@bschmalhofer bschmalhofer added the enhancement New feature or request label Jul 27, 2020
@bschmalhofer bschmalhofer added this to the OTOBO 10.0.3 milestone Jul 27, 2020
@bschmalhofer
Copy link
Contributor Author

@StefanRother-OTOBO

Was benutzt du wenn du nicht installer.pl durchklicken willst ?

@bschmalhofer
Copy link
Contributor Author

bschmalhofer commented Aug 11, 2020

Here are the requirements:

  • verify that ZZZAAuto.pm does not exist yet

  • verfiy that SecureMode is not activated

  • verify that Home exists

  • verify that Kernel/Config.pm exists and is readable and writable

  • verify the scripts/database and the relevant .xml files exists

  • verify that the connection to the DB as root is possible, password was passed on command line

  • ping the database

  • verify that the database 'otobo' does not exist yet

  • create the database user 'otobo' with the password 'otobo'

  • create the database schema 'otobo'

  • initial insert in the schema 'otobo'

  • deactivate the webservice Elasticsearch

  • save Kernel/Config.pm with the changed database password

  • set HttpType to http in the SysConfig

  • set DefaultLanguage to English in the SysConfig

  • deploy the SysConfig, creating ZZZAAuto,pm

  • set random password for root@localhost

  • print URL and password for root@localhost

  • print warning that the container 'otobo_cron_1' should be stopped

  • provide a command for quickly running the test suite in docker

bschmalhofer added a commit that referenced this issue Aug 12, 2020
Cons::Fast is better anyways. At least Reini Urban said so.
bschmalhofer added a commit that referenced this issue Aug 13, 2020
Because the two files have interdependencies via @SQLPost
bschmalhofer added a commit that referenced this issue Aug 13, 2020
Use the correct subroutine name.
bschmalhofer added a commit that referenced this issue Aug 13, 2020
bschmalhofer added a commit that referenced this issue Aug 13, 2020
bschmalhofer added a commit that referenced this issue Aug 13, 2020
bschmalhofer added a commit that referenced this issue Aug 13, 2020
@bschmalhofer bschmalhofer modified the milestones: OTOBO 10.0.3, OTOBO 10.1 Aug 14, 2020
@bschmalhofer
Copy link
Contributor Author

Move it to OTOBO 10.1, as this is not a bugfix.

@bschmalhofer
Copy link
Contributor Author

bschmalhofer commented Aug 14, 2020

For development the current workflow is like:

  • Be aware that all data in the MySQL database will be lost
  • In dir docker: bin/docker/build_docker_images.sh
  • switch to the directory otobo-docker
  • set OTOBO_IMAGE_OTOBO=otobo:local in .env
  • grep OTOBO_DB_ROOT_PASSWORD .env the password is needed later
  • docker-compose down -v
  • docker-compose up -d
  • docker exec -t --user otobo otobo_web_1 bash -c "date ; hostname ; rm -f Kernel/Config/Files/ZZZAAuto.pm ; bin/docker/quick_setup.pl --db-password <PASSWORD>"
  • Remember the random password for root@localhost or log in and keep the password in the safe
  • docker stop otobo_cron_1 ; docker exec -t --user otobo otobo_web_1 bash -c " date ; hostname ; bin/docker/run_test_suite.sh"

The results will be written to a file prove.out_ in /opt/otobo .

The progess can be tracked e.g. with: docker exec -t --user otobo otobo_web_1 bash -c " date ; ls -l prove_*.out ; wc -l prove_*.out ; grep -c '\''^not ok '\'' prove_*.out"

The workflow can surely be improved, but is good enough for closing this issue.

bschmalhofer added a commit that referenced this issue Aug 14, 2020
bschmalhofer added a commit that referenced this issue Aug 14, 2020
Probably not needed for a regulare installation as well.
bschmalhofer added a commit that referenced this issue Aug 14, 2020
In this case run the commands via 'docker exec', not 'docker run'
bschmalhofer added a commit that referenced this issue Aug 14, 2020
@bschmalhofer bschmalhofer self-assigned this Nov 28, 2021
@bschmalhofer bschmalhofer modified the milestones: OTOBO 10.1, OTOBO 10.1.1 Nov 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant