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

Introduce a new component: worker which performs the real builds #260

Open
wants to merge 49 commits into
base: develop
Choose a base branch
from

Conversation

jawher
Copy link
Contributor

@jawher jawher commented Jul 13, 2015

through a queue (using beanstalkd)

Only server now has access to mongo. All other components go through
the REST api.

The build log is now captured using the syslog logging driver for
dockeOnly server now has access to mongo. All other components go
through the REST api.

The build log is now captured using the syslog logging driver for docker

- bzk service restart == bzk service stop && bzk service start
- Rename tag option by version on bzk service start
- Add --recreate options on bzk service restart which destroy container before restarting it
@jawher
Copy link
Contributor Author

jawher commented Jul 13, 2015

WARNING This PR needs docker experimental features, mainly syslog-tag support, which was merged after the 1.7 release.

What remains to be done:

  • Use the server syslog url env var instead of hard coded docker0 bridge
  • Rework the global SCM key management
  • Handle slots (fixed number of parallel builds)
  • Make the CLI manage a beanstalk container (besides server, web and mongo)
  • Add cli worker sub-command to be able to start a worker container

@jawher jawher added the ON HOLD label Jul 13, 2015
julienvey and others added 15 commits August 19, 2015 11:15
When showing variant list, selected row is highlighted, and unselected rows
are lightened
During a build, the created directories (build, shared source, ...)
were created using 0644 permissions instead of 0755.

What's really weird is that it used to work in VirtualBox VMs, but
fails (which is to be expected) in VMWare VMs.
The API (and therefore the CLI) now only expose 2 operations: get and set an SCM key on a project.

This PR also includes a bit of cleanup/refactoring on the mongo db code
Self explanatory diff. Oops !
In order to fix spurious mongoldb data corruption which can occur with no grace.

The server component was also modified to listen to and handle the SIGTERM signal docker sends to containers when stopping them, to avoid blocking for the duration of the grace period before stopping.
Fix created directories permissions
Fix a JSON config bug in Variant struct
…ntainers

Add a 5 second grace period when stopping the bazooka containers
Rework jobs and variants lists for a more responsive layout
@jawher
Copy link
Contributor Author

jawher commented Sep 29, 2015

I'm working on splitting the work done here into smaller and more manageable pull requests. I can see 3 macro parts:

  • Use syslog to collect logs
  • Let all components (orch, parser and lang parsers) call the server API instead of mongo to manage builds
  • Extract the concrete build part to a worker component

Jawher Moussa and others added 5 commits October 15, 2015 21:38
This internal API is intended to be used by orchestration to manipulate
jobs and variants using only the API instead of mongo
This will be needed for orchestration and parser to retrieve the
required images using the API instead of mongo
The error was caused by parsing the json body into a map, whereas the
validator (automatically invoked) expects a struct
Add an API to serve a specific image given its name
Add an internal API to manipulate jobs and variants
jawher and others added 19 commits November 15, 2015 22:38
In order to do things like nark jobs and variants as finished, add SCM
info, ...
…ongo

Orchestration now uses the HTTP API instead of mongo
Parser now use the image API to retrieve the language parser image to use
Bazooka will now systematically use a defer function to remove containers
created during the build of a projet

This function is common to all the modules, and is available in
commons/container.go

Closes #271
Use defer to remove containers
Tests files are not used by any tests, and are outdated anyway
Homogenize to use URL instead of URI
Update generator to manage changes in working directory
Use templates to generate bzk build scripts and Dockerfile
julienvey and others added 4 commits December 10, 2015 11:53
Add error details when logging scm fetch error
* Use new json format
* fix the startJob that was blocking
Bazooka used to rely on links to work:

* The DB container was linked into the server container
* The server container was linked into the web container

This PR proposes to replace these links (which are to be considered a
deprecated and legacy feature in Docker) with the usage of bridge
networks:

`bzk service start` will create a `bzk_net` network if it doesn't
exist, and attach the db, server and containers to it for them to be
able to communicate.

The build flow was also modified so that the various build containers
(orchestration, parser, ...) are attached to the same network when
started.

This PR alos adds a working docker compose config capable of starting
bazooka using docker compose.
through a queue (using beanstalkd)

Only server now has access to mongo. All other components go through
the REST api.

The build log is now captured using the syslog logging driver for
dockeOnly server now has access to mongo. All other components go
through the REST api.

The build log is now captured using the syslog logging driver for docker
@jawher jawher changed the title Introduce a new componenet: worker which performs the real builds Introduce a new component: worker which performs the real builds May 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants