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

[REARCH] Container orchestrator #207

Merged
merged 8 commits into from
Feb 16, 2018

Conversation

carbonin
Copy link
Member

@carbonin carbonin commented Aug 25, 2017

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!

@miq-bot
Copy link
Member

miq-bot commented Aug 29, 2017

This pull request is not mergeable. Please rebase and repush.

@miq-bot
Copy link
Member

miq-bot commented Aug 31, 2017

This pull request is not mergeable. Please rebase and repush.

@miq-bot
Copy link
Member

miq-bot commented Sep 14, 2017

This pull request is not mergeable. Please rebase and repush.

@miq-bot
Copy link
Member

miq-bot commented Dec 18, 2017

This pull request is not mergeable. Please rebase and repush.

@miq-bot
Copy link
Member

miq-bot commented Jan 12, 2018

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.
FROM manageiq/manageiq-base:latest
MAINTAINER ManageIQ https://manageiq.org

LABEL name="manageiq-base-worker" \
Copy link
Member

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-"?

Copy link
Member

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?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

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" \
Copy link
Member

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
Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member

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" \
Copy link
Member

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" \
Copy link
Member

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" \
Copy link
Member

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
@miq-bot
Copy link
Member

miq-bot commented Feb 16, 2018

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
3 files checked, 1 offense detected

**

  • 💣 💥 🔥 🚒 - Linter/Yaml - missing config files

@carbonin carbonin changed the title [WIP] [REARCH] Container orchestrator [REARCH] Container orchestrator Feb 16, 2018
@carbonin carbonin removed the wip label Feb 16, 2018
@Fryguy Fryguy merged commit 369bf9d into ManageIQ:master Feb 16, 2018
@Fryguy Fryguy added this to the Sprint 80 Ending Feb 26, 2018 milestone Feb 16, 2018
carbonin added a commit to carbonin/manageiq-pods that referenced this pull request Feb 19, 2018
carbonin added a commit to carbonin/manageiq-pods that referenced this pull request Feb 19, 2018
bdunne added a commit that referenced this pull request Feb 20, 2018
…late

Fix the external db template after merging #207
@carbonin carbonin deleted the container_orchestrator branch April 7, 2020 14:51
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.

4 participants