-
Notifications
You must be signed in to change notification settings - Fork 100
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
[REARCH] Container orchestrator #207
Conversation
6e84b10
to
0b41b99
Compare
This pull request is not mergeable. Please rebase and repush. |
0b41b99
to
9b07aad
Compare
This pull request is not mergeable. Please rebase and repush. |
9b07aad
to
4182d26
Compare
This pull request is not mergeable. Please rebase and repush. |
e328a21
to
8da286e
Compare
This pull request is not mergeable. Please rebase and repush. |
8da286e
to
dab0058
Compare
This pull request is not mergeable. Please rebase and repush. |
This makes the entire app act as one server. The GUID is generated using a template parameter and is provided to the server pod using an environment variable. We ignore logs because we will be printing our logs to STDOUT which will be processed by the EFK log aggregation stack. We also remove certs because they will be handled by the httpd pod or by the route itself. This allows us to remove the "server" PV entirely.
Now we have a base image which contains the manageiq code base then we build the orchestrator image and worker images from there. The only image that contains the comiled assets is the UI image. Every image that runs a web server exposes only port 3000, so we make apache listen on that port and the UI worker binds to port 3001 A common liveness check script (manageiq_liveness_check) is used for all images which don't have a service. Each web server worker has it's own service which is pointed to by httpd directly. This means that we can also remove the "manageiq" service.
ab37f58
to
2ede1ba
Compare
FROM manageiq/manageiq-base:latest | ||
MAINTAINER ManageIQ https://manageiq.org | ||
|
||
LABEL name="manageiq-base-worker" \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we drop the "manageiq-"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the LABEL for anyway...OpenShift?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably don't need it, but it's a way to add metadata to an image. https://docs.docker.com/engine/reference/builder/#label
https://docs.openshift.com/enterprise/3.0/creating_images/metadata.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OpenShift probably interprets them in some way, but our image metadata isn't really in openshift anymore; not since we removed Image Streams anyway. Maybe we can just remove these?
As far as I can tell the only way to see the labels is to docker inspect
an image and in this case ours shows this:
"Labels": {
"build-date": "20170510",
"description": "ManageIQ is a management and automation platform for virtual, private, and hybrid cloud infrastructures.",
"io.k8s.description": "ManageIQ is a management and automation platform for virtual, private, and hybrid cloud infrastructures.",
"io.k8s.display-name": "ManageIQ",
"io.openshift.tags": "ManageIQ,miq,manageiq",
"license": "GPLv2",
"name": "manageiq-base-worker",
"release": "",
"summary": "ManageIQ Worker Image",
"url": "https://manageiq.org/",
"vendor": "ManageIQ",
"version": "Master"
}
There's probably some things there we want to change, but it hardly seems necessary to include all of that.
CONTAINER_SCRIPTS_ROOT=/opt/manageiq/container-scripts \ | ||
IMAGE_VERSION=${REF} | ||
|
||
## Atomic/OpenShift Labels | ||
LABEL name="manageiq" \ | ||
LABEL name="manageiq-base" \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same. Maybe replace it with "application-base" or something?
curl -L https://github.com/${APPLIANCE_ORG}/manageiq-appliance/tarball/${APPLIANCE_REF} | tar vxz -C ${APPLIANCE_ROOT} --strip 1 | ||
|
||
RUN mkdir -p ${SUI_ROOT} && \ | ||
curl -L https://github.com/${SUI_ORG}/manageiq-ui-service/tarball/${SUI_REF} | tar vxz -C ${SUI_ROOT} --strip 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed in this layer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe not?
I was trying to get all of the source in this image though for ease of development, but if it makes a big difference we could probably move this to the webservice image.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's actually quite small... 5.1MB currently for master.
FROM manageiq/manageiq-base-worker:latest | ||
MAINTAINER ManageIQ https://manageiq.org | ||
|
||
LABEL name="manageiq-webserver-worker" \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same
FROM manageiq/manageiq-webserver-worker:latest | ||
MAINTAINER ManageIQ https://manageiq.org | ||
|
||
LABEL name="manageiq-ui-worker" \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same
FROM manageiq/manageiq-base:latest | ||
MAINTAINER ManageIQ https://manageiq.org | ||
|
||
LABEL name="manageiq-orchestrator" \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same
We don't have a PV for the server anymore
Checked commits carbonin/manageiq-pods@406ce3b~...435e07b with ruby 2.3.3, rubocop 0.52.0, haml-lint 0.20.0, and yamllint 1.10.0 **
|
Missed this in ManageIQ#207
Missed this in ManageIQ#207
…late Fix the external db template after merging #207
This PR alters the pods repo such that it supports the container orchestrator model of manageiq.
One of the goals of the ManageIQ Rearch effort is to move our workers into individual pods, but have them controlled by what is now the
MiqServer
process.This will be the only pod created by the template and the server will talk directly to OpenShift to create the workers. This PR works directly with the changes in ManageIQ/manageiq#15884 to achieve this.
Don't even consider merging this 😄 I'm opening it to keep everyone on the same page about how the re-architecture is going to affect this repo after the G-release.We can consider merging this now!