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

How to do hostmaster upgrades #42

Open
PaulLebmann opened this issue Apr 11, 2018 · 2 comments
Open

How to do hostmaster upgrades #42

PaulLebmann opened this issue Apr 11, 2018 · 2 comments

Comments

@PaulLebmann
Copy link

Hi,

I'm running hostmaster:latest and it is working great. Thank you for this great project!
Until now I could work around or fix every problem I had with it. But I still got an conceptional question. I don't get how updates can work.

Since you define /var/aegir as a volume in your Dockerfile I mounted a named volume in my docker-comopose.yml to this directory. Maybe this was my error.
As far as I understand it /var/aegir/platforms has to be persistent even if a container is recreated and since you just defined /var/aegir I used this.
In entrypoint.sh you check if @hostmaster is set, which, as I understand it, means that /var/aegir/.drush has to be present.
After that you check if $AEGIR_HOSTMASTER_ROOT contains the hostmaster site.
What I don't get if: If $AEGIR_HOSTMASTER_ROOT does exist, how can it not contain the hostmaster site (after it is installed the first time)?

Do I have to download the latest version of provision and create the new hostmaster platform myself and then rename the old version and let docker-entrypoint.sh to the migration?

I found https://github.com/aegir-project/dockerfiles/pull/15 and read the commit message but I still don't get it.

Could you please elaborate on the process or extend the documentation since I have absolutely no idea other than starting a shell in the container and doing it the same way as I did the last years.
Thanks!

@PaulLebmann
Copy link
Author

OK, so either no one else is experiencing this problem or it's just obvious for everyone but me.

After multiple failed attempts and multiple times of re-setting up the hostmaster I tried again getting into it. Could it be that:

# Only upgrade if site not found in current containers platform.
  if [ ! -d "$AEGIR_HOSTMASTER_ROOT/sites/$HOSTNAME" ]; then
      echo "ÆGIR | Site not found at $AEGIR_HOSTMASTER_ROOT/sites/$HOSTNAME, upgrading!"
      echo "ÆGIR | Running 'drush @hostmaster hostmaster-migrate $HOSTNAME $AEGIR_HOSTMASTER_ROOT -y'...!"
      drush @hostmaster hostmaster-migrate $HOSTNAME $AEGIR_HOSTMASTER_ROOT -y
  else
      echo "ÆGIR | Site found at $AEGIR_HOSTMASTER_ROOT/sites/$HOSTNAME"
  fi

means that I have to set $AEGIR_HOSTMASTER_ROOT in my docker-compose.yml to another path to trigger the update?

But isn't there another problem? To cite the aegir documentation:

Bottomline: first you upgrade the backend, then the frontend.

How is provision upgraded?
In entrypoint.sh I can only find the code to download provision if it is not already installed.

Maybe

drush dl provision-$PROVISION_VERSION --destination=/var/aegir/.drush/commands -y
drush cc drush

should be added before running hostmaster-migrate.

@PaulLebmann
Copy link
Author

I tried:

  • manually updating provision in the container
  • redefining the AEGIR_HOSTMASTER_ROOT variable in docker-compose.yml to something other than the value before
  • docker-compose up -d

and the hostmaster migrate happens as intended.

Even if it is / was obviously only me that took 1.5 years to figure it out I still think this is an issue with the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant