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

Simplify installations #10

Closed
naspeh opened this issue Mar 23, 2017 · 1 comment
Closed

Simplify installations #10

naspeh opened this issue Mar 23, 2017 · 1 comment

Comments

@naspeh
Copy link
Contributor

naspeh commented Mar 23, 2017

Use settings.py

Regarding #7 need to get rid /etc/superdesk.sh and /opt/superdesk/env.sh and start to use only settings.py for server related configurations.

Get rid of supervisord

There are some reasons for that.

supervisord don't have support for python3, so it needs python2 just for run it.

It sounds good to switch totally to systemd (default init system in Ubuntu 16.04), but our system engineers are using one systemd service with honcho and they are going to use it for a while yet, so seems it's good also to use the same setup to be closer to our production instances.

Also it'll simplify the installation a bit, because supervisor and systemd configs are more verbose, so probably it'll be simpler to run two instances of superdesk in the same container for development and for unit tests.

Combine build and deploy steps

It was desirable splitting, for repeating steps from production and for optimization in CI (the build step takes 3+ minutes, and redeployment takes only 1-2 minutes and this's good). But it adds complicity in installation and administration of such instances. After combining these steps, upgrade process will be simpler and more understandable for users.

@naspeh
Copy link
Contributor Author

naspeh commented May 30, 2017

Next things have been done for this.

Combine build and deploy steps

In general there is still separate build and deploy steps, but grunt build is now running during deploy step, so all env variables are available already, so it's also kind of simplification, developers often use env variables in superdesk-client-core and liveblog too, so I don't need to keep and modify config.json file in fireq repository. Should be easy to maintain fireq.

Get rid of supervisord

So now we have systemd service file with honcho inside, looks better, also it's possible to create another systemd service for testing purposes (like running e2e tests).

Use only settings.py for server configuration

I gave up this idea, because we have too many different projects with different settings.py and moving them to fireq repository is just crazy. Anyway it still needs some env variables declared somewhere, for client SUPERDESK_URL, SUPERDESK_WS_URL are needed, PYTHONUNBUFFERED=1 and C_FORCE_ROOT=1 for honcho, etc. So for simplification (from user perspective) we now have one /opt/superdesk/activate.sh where we load virtualenv and declare some env variables, there is optional /opt/superdesk/env.sh which uses in CI and loads in activate.sh script.

There is also new build&deploy templates tpl/superdesk-new without main superdesk repo and with minimal set of files to run superdesk using just cores. It was created mainly for inspiration in regards of #8 (rethink main repo), union /opt/superdesk/activate.sh script came from this attempt... It can be used for user installations in future.

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

No branches or pull requests

1 participant