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

[Proposal] Staged Setup Process. Fixes #30 #241

Open
pi0 opened this Issue Jan 6, 2017 · 0 comments

Comments

Projects
None yet
4 participants
@pi0
Contributor

pi0 commented Jan 6, 2017

The problem

As formerly mentioned in #30 setup process is a one way trip and we should somehow avoid running it multiply times by user. Currently if anything goes wrong customers should backup then reinstall and reconfigure entire system OR they can recall setup.py which is not SAFE to be called multiply times.

Solution

If we inspect setup script currently all steps run on every setup execution. we can categorize and assign each task/step an special level that indicates if step should be run during setup process or not.

Level 1: System Setup

Including configure-system, download wars, install JRE and coping static assets.Steps in this level are system wide related and safe to rerun many times. This is specially useful for users to repair/upgrade system packages that ship with Gluu.

Level 2: (Re)Generate Configurations

Scripts in this level only generate configurations according to setup.properties file and install them system wide.

Level 3: Migrate DB

This is the most Dangerous level and should be cared .User should be warned if db already installed. the point is user can easily be asked to migrate newer versions instead of reinstall.

Note install_ldap_server step internally calls import_ldif_openldap which is wrong. First should be on level 1 and import part should be directly an setup level 3 step.

Level 4: Start Services

Pros

By this improvement:

  • Customers can have a much safer and high quality setup.
  • Customers have online upgrade/repair solution without need to reinstall rootfs again.
  • Sysadmins can prepare pre-setup containers ready to just configure and use.
  • Helps much if we plan docker-izing CE containers.
  • Clean setup model as system/asset/config/migration units are clearly separated.
  • We can have better unit tests from each setup stage.
  • Fixes #30 !

TODO

  • Making a PR which implements proposal.
  • Fix level 3 issues by a separate PR.
  • Listing and assigning levels to setup.py steps.

@yurem yurem added this to the CE 3.1.2 milestone Oct 9, 2017

@willow9886 willow9886 modified the milestones: CE 3.1.2, CE 3.2.0 Nov 7, 2017

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