Skip to content

Release v2.1 #537

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

Merged
merged 10 commits into from
Jan 22, 2020
Merged

Release v2.1 #537

merged 10 commits into from
Jan 22, 2020

Conversation

sauloperez
Copy link
Collaborator

Creating a new release that includes the following changes:

markets and others added 10 commits October 3, 2019 20:45
Remove LazyRecoverable and dalli (and memcached)
The new production server does work the same way as staging and this
hack is not needed anymore.
So we can remove the following manual step from the deployment process:

> 9. There is one last step though. Until we don't fix it, the app server
needs to be restarted manually for the changes to be loaded. Run:

> $ ssh timeoverflow@www.timeoverflow.org
> $ sudo systemctl restart timeoverflow
> $ sudo systemctl restart sidekiq

Now Capistrano's output looks like:

```
INFO [fbff0613] Running /usr/bin/env rm -rf /var/www/timeoverflow/releases/20191220151536 as timeoverflow@staging.timeoverflow.org
DEBUG [fbff0613] Command: ( export RBENV_ROOT="$HOME/.rbenv" RBENV_VERSION="" ; /usr/bin/env rm -rf /var/www/timeoverflow/releases/20191220151536 )
 INFO [fbff0613] Finished in 0.183 seconds with exit status 0 (successful).
 INFO [9ab57c12] Running sudo systemctl reload timeoverflow as timeoverflow@staging.timeoverflow.org
DEBUG [9ab57c12] Command: sudo systemctl reload timeoverflow
 INFO [9ab57c12] Finished in 0.218 seconds with exit status 0 (successful).
 INFO [41e063eb] Running sudo systemctl restart sidekiq as timeoverflow@staging.timeoverflow.org
DEBUG [41e063eb] Command: sudo systemctl restart sidekiq
 INFO [41e063eb] Finished in 2.895 seconds with exit status 0 (successful).
DEBUG [3772e021] Running if test ! -d /var/www/timeoverflow/releases; then echo "Directory does not exist '/var/www/timeoverflow/releases'" 1>&2; false; fi as timeoverflow@staging.timeoverflow.org
DEBUG [3772e021] Command: if test ! -d /var/www/timeoverflow/releases; then echo "Directory does not exist '/var/www/timeoverflow/releases'" 1>&2; false; fi
DEBUG [3772e021] Finished in 0.181 seconds with exit status 0 (successful).
 INFO [266848f2] Running echo "Branch reload-unicorn-after-deployment (at fad9dbd) deployed as release 20191220152039 by pau" >> /var/www/timeoverflow/revisions.log as timeoverflow@staging.timeoverflow.org
DEBUG [266848f2] Command: echo "Branch reload-unicorn-after-deployment (at fad9dbd) deployed as release 20191220152039 by pau" >> /var/www/timeoverflow/revisions.log
 INFO [266848f2] Finished in 0.181 seconds with exit status 0 (successful).
```

Which generates the following log line

```
==> log/unicorn.err.log <==
E, [2019-12-20T16:20:59.911297 #32630] ERROR -- : reexec-ed child already running PID:1213
```
This is the safest way to have the exact same config across these two
envs. Keep in mind next will die in the upcoming days. Meanwhile, let's
keep them in sync.
Reload Unicorn and Sidekiq after deployment
We used to connect to it through the PostgreSQL URL but that ENV var is
no longer present in the server and we have `DATABASE_NAME` instead.
That's what we already used successfully with the `next` environment.

This is required to deploy using the `production` environment or the app
won't be able to connect to the DB.
Replace DATABASE_URL with DATABASE_NAME
@sauloperez sauloperez merged commit c634a8d into master Jan 22, 2020
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

Successfully merging this pull request may close these issues.

2 participants