Skip to content
This repository has been archived by the owner on Mar 11, 2021. It is now read-only.

Lets use CentOS Linux 7 #118

Closed
wants to merge 1 commit into from
Closed

Lets use CentOS Linux 7 #118

wants to merge 1 commit into from

Conversation

kbsingh
Copy link
Contributor

@kbsingh kbsingh commented Aug 12, 2016

the rest of the infra coming up, and the integration points with the other efforts are all based on and around CentOS Linux 7/x86_64 - can we then use that for the container build here as well ?


This change is Reviewable

@maxandersen maxandersen mentioned this pull request Aug 16, 2016
40 tasks
@kwk
Copy link
Collaborator

kwk commented Aug 16, 2016

Currently the Jenkins complains because it cannot clone repos of dependencies. If I manually exec bash inside this centos:7 docker container and try to clone something I get this error:

fatal: unable to look up current user in the passwd file: no such user
Unexpected end of command stream

This is caused by the -u switch when starting docker.

It seems fedora has no problems running under a user that has no entry in passwd file.

The solution (found here ) to this is to manually export these two variables before doing the cloning:

export GIT_COMMITTER_NAME="user"
export GIT_COMMITTER_EMAIL="user@example.com"

I'll create a patch for this soon.

@ppitonak
Copy link
Contributor

test this

kwk added a commit that referenced this pull request Aug 24, 2016
To allow for better development with docker I've integrated the files from the `jenkins/linux` directory into the normal Makefile process.

If you are on Linux and have docker installed you get the following new `make` targets.

**NOTE: During executing of the docker command, the local directory is mounted  with r/w  permissions into the container and artifacts will be written to your local directory structure. The reason for this is that it allows us to package them further.**

 * `make docker-start`

 Builds a docker image (if needed) that will be used to build the project inside a docker container.
After creating the builder image from `Dockerfile.builder` a container is started in the background under a name that is known to the Makefile. This container will be used in the other new Make targets to execute steps one by one and repeatable.
 * `make docker-deps`
 
 Inside the running container execute the `make deps` step.
 * `make docker-generate`
 
 Inside the running container execute the `make generate` step.
 * `make docker-build`
 
 Inside the running container execute the `make build` step.
 * `make docker-test-unit`
 
 Inside the running container execute the `make test-unit` step.
 * `make docker-test-integration`
 
 Inside the running container execute the `make test-integration` step. This target checks for the existence of a PostgreSQL container that was started using the `make integration-test-env-prepare` command. This target doesn't bother if there is any other PostgreSQL container 	running at the moment. It only accepts the one created from the `.make/docker-compose.integration-test.yaml`.
 * `make docker-rm`
 
 Stops and removes the running container that was started with `make docker-start`.
 * `make docker-image-deploy`
 
 Creates a docker image named "almighty-core-deploy" based on `Dockerfile.deploy` that contains a ready to run almighty-core server. The artifacts packaged in this image will be taken from the `bin/` directory, so beware that you've created them using the new `docker-*` targets.

* `make docker-publish-deploy`

 Tags the image that was build with `docker-image-deploy` to `almightycore/almighty-core:latest` and pushes it to the docker hub.

To not break compatibility with running Jenkins jobs, the Makefile in `jenkins/linux` now calls the above `docker-*` make targets.

***

We have two `Dockerfile`s now:

1. `Dockerfile.builder` - Used to build almighty-core (using centos:7 so #118 is done) 
2. `Dockerfile.deploy` -  Used to package almighty-core for deployment.

***

Tests now populate the return code as exit code to the CLI when executed with `go test`.

***

The `docker-compose.yaml` file now contains two services `db` and `core` and uses version 2 of the docker-compose file format. The core container waits until the database container has opened the required port before it starts the almighty-core process.
@kwk
Copy link
Collaborator

kwk commented Aug 24, 2016

@kbsingh I think you can close this PR since 48a4c23

@kbsingh kbsingh closed this Aug 24, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants