openshift
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| openshift [2018/02/21 08:55] – [OpenShift CICD] skipidar | openshift [2020/12/27 20:35] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 63: | Line 63: | ||
| * OpenShift is supported anywhere that Red Hat Enterprise Linux is | * OpenShift is supported anywhere that Red Hat Enterprise Linux is | ||
| - | ==== OpenSHift UX ==== | + | |
| + | |Scheduler|< | ||
| + | Select best-fit node | ||
| + | * Sort nodes based on scores | ||
| + | * | ||
| + | * If multiple nodes have same high score, select one at random | ||
| + | </ | ||
| + | |Replication Controller|Ensures that specified number of pod replicas running at all times. Adds or deletes pods according to life signs.| | ||
| + | |OpenShift Networking|< | ||
| + | * | ||
| + | * | ||
| + | * | ||
| + | * | ||
| + | |||
| + | **Scenario**: | ||
| + | |||
| + | * DNS resolves to host running router container | ||
| + | * Using openshift-sdn overlay network: | ||
| + | * | ||
| + | |||
| + | |||
| + | **Scenario**: | ||
| + | |||
| + | * | ||
| + | * | ||
| + | * | ||
| + | |||
| + | </ | ||
| + | |Route|< | ||
| + | Exposes service by giving it externally reachable hostname (FQDN). | ||
| + | </ | ||
| + | | Router|< | ||
| + | * Router is ingress point for traffic destined for OpenShift-hosted pods | ||
| + | * The Router serves routes - consumes a defined route and endpoints, identified by a service. | ||
| + | * The Router serves the routing layer. | ||
| + | * Router container can run on any node host in environment | ||
| + | </ | ||
| + | | Services |< | ||
| + | * Services often used to provide permanent IP to group of similar pods | ||
| + | * Internally, when accessed, services load-balance and proxy to an appropriate backing pod | ||
| + | * Backing pods can be added to or removed from service arbitrarily while service remains consistently available | ||
| + | * Enables anything that depends on service to refer to it at consistent internal address | ||
| + | |||
| + | </ | ||
| + | | XXX |< | ||
| + | </ | ||
| + | |||
| + | |||
| + | ===Container Deployment Workflow=== | ||
| + | |||
| + | Scenario: New application requested via CLI, web console, or API | ||
| + | |||
| + | ==OpenShift API/ | ||
| + | |||
| + | * Approves request, considering user’s permissions, | ||
| + | * Creates supporting resources: deployment configuration, | ||
| + | |||
| + | ==OpenShift scheduling layer:== | ||
| + | |||
| + | * Designates node host for each pod, considering resources' | ||
| + | |||
| + | ==OpenShift node:== | ||
| + | |||
| + | * Pulls down image to be used from external or integrated registry | ||
| + | * Starts container (pod) on node | ||
| Line 69: | Line 134: | ||
| + | == Update Rollout strategies == | ||
| + | |||
| + | |Rolling Update|Pre life cycle hook. Scale up/down new/old pods one by one. Wait for readiness checks. Post life cycle hooks. No downtime.| | ||
| + | |Recreate| Scale down all old. Scale up all new. Has downtime.| | ||
| + | |||
| + | |||
| + | == Concepts == | ||
| + | |||
| + | | BuildConfig |< | ||
| + | Definition of the entire build process as code. | ||
| + | </ | ||
| + | | Build Strategies|< | ||
| + | Build strategies for building artifacts. Artifact resulting from build depends on builder used to create it. | ||
| + | * | ||
| + | * | ||
| + | * | ||
| + | * | ||
| + | |||
| + | For Docker and S2I builds, resulting objects are runnable images. | ||
| + | For custom builds, resulting object are whatever builder image author specified. | ||
| + | |||
| + | </ | ||
| + | | Source-to-Image (S2I) Build|< | ||
| + | * Source-to-Image (S2I) is tool for building reproducible Docker images | ||
| + | * Produces ready-to-run images by injecting application source into Docker image and assembling new Docker image | ||
| + | * New image incorporates base image (builder) and built source and is ready to use with docker run command | ||
| + | |||
| + | Reproducability. S2I supports incremental builds, which reuse previously downloaded dependencies, | ||
| + | |||
| + | Security. Builds and runs are executed as root, which may be exposed. S2I can execute commands with less rights. | ||
| + | |||
| + | </ | ||
| + | | Image Stream |< | ||
| + | Docker images from different sources, identified by the same tag. \\ | ||
| + | Can be monitored, to trigger a build as a result. | ||
| + | </ | ||
| + | | Jenkins pipeline |< | ||
| + | * A Jenkins can be used to build artifacts via OPenShift. | ||
| + | * A Jenkins strategy is chose in BuildConfig | ||
| + | * A Jenkins-Pipeline is defined as code in BuildConfig | ||
| + | |||
| + | During the build the following will then happen | ||
| + | * A Jenkins will be started in a container and reused by all Jobs with the Jenkins-build-strategy. | ||
| + | * A Pipeline will be created. | ||
| + | * An image will be build. | ||
| + | * An image will be put into the registry. | ||
| + | * Then optionally, via trigers, the pod can be replaced by new pods with the container from new image. | ||
| + | |||
| + | Build via OpenShift pipelines: | ||
| + | {{https:// | ||
| + | |||
| + | More: | ||
| + | https:// | ||
| + | |||
| + | </ | ||
| + | | XXX |< | ||
| + | </ | ||
| + | | XXX |< | ||
| + | </ | ||
| + | | XXX |< | ||
| + | </ | ||
| + | | XXX |< | ||
| + | </ | ||
| ==== API ==== | ==== API ==== | ||
| < | < | ||
| + | |||
| + | |||
| + | # list pods | ||
| oc get pod | oc get pod | ||
openshift.1519203330.txt.gz · Last modified: (external edit)
