Skip to content
GitLab
Next
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
GitLab
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
4
Snippets
Groups
Projects
Show more breadcrumbs
GitLab.org
GitLab
Commits
94c6340a
Commit
94c6340a
authored
5 years ago
by
Dylan Griffith
Browse files
Options
Downloads
Patches
Plain Diff
Initial docs for sidekiq worker with Auto DevOps
parent
41f22c6b
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/topics/autodevops/index.md
+46
-0
46 additions, 0 deletions
doc/topics/autodevops/index.md
with
46 additions
and
0 deletions
doc/topics/autodevops/index.md
+
46
−
0
View file @
94c6340a
...
...
@@ -584,6 +584,52 @@ Unless you have a `Dockerfile` in your repo, your image is built with
Herokuish, and you must prefix commands run in these images with
`/bin/herokuish
procfile exec`
to replicate the environment where your application will run.
#### Workers
Some web applications need to run extra deployments for "worker processes". For
example it is common in a Rails application to have a separate worker process
to run background tasks like sending emails.
The
[
default Helm chart
](
https://gitlab.com/gitlab-org/charts/auto-deploy-app
)
used in Auto Deploy
[
has support for running worker
processes
](
https://gitlab.com/gitlab-org/charts/auto-deploy-app/merge_requests/9
)
.
In order to run a worker you'll need to ensure that it is able to respond to
the standard health checks which expect a successful HTTP response on port
`5000`
. For sidekiq you could make use of the
[
sidekiq_alive gem
](
https://rubygems.org/gems/sidekiq_alive
)
to do this.
In order to work with sidekiq you'll also need to ensure your deployments have
access to a redis instance. Auto DevOps won't deploy this for you so you'll
need to manage this separately and then set a CI variable
`K8S_SECRET_REDIS_URL`
which the URL of this instance to ensure it's passed
into your deployments.
Once you have configured your worker to respond to health checks you you will
need to configure a CI variable
`HELM_UPGRADE_EXTRA_ARGS`
with the value
`--values helm-values.yaml`
. Then you can, for example, run a
[
sidekiq
](
https://github.com/mperham/sidekiq
)
worker for your rails application
by adding a file named
`helm-values.yaml`
to your repo with the following
content:
```
yml
workers
:
sidekiq
:
replicaCount
:
1
command
:
-
/bin/herokuish
-
procfile
-
exec
-
sidekiq
preStopCommand
:
-
/bin/herokuish
-
procfile
-
exec
-
sidekiqctl
-
quiet
terminationGracePeriodSeconds
:
60
```
### Auto Monitoring
See the
[
requirements
](
#requirements
)
for Auto Monitoring to enable this stage.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment