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

BZ 1446644 Adding more detail on image streams #5322

Merged
merged 1 commit into from
Nov 15, 2017

Conversation

mburke5678
Copy link
Contributor

@mburke5678
Copy link
Contributor Author

@sferich888
I have worked in some of the information in the FAQ and pulled the latest admonition from the K base article.
What other sources can you suggest?
I can't find anything on "strict" and "loose" dependency management styles; not sure what to look for.
Any advice would be appreciated.

@bparees
Copy link
Contributor

bparees commented Sep 26, 2017

@bmcelvee this looks similar to the item i suggested to you.

Copy link
Contributor

@bparees bparees left a comment

Choose a reason for hiding this comment

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

I think we should start this with a glossary of terms that explains:

  • docker repository (docker.io/openshift/jenkins-2-centos7)

  • docker repository tag (docker.io/openshift/jenkins-2-centos7:latest)

  • docker image sha (docker.io/openshift/jenkins-2-centos7@sha256:ab312bda324)

  • imagestream

  • imagestream tag

  • imagestream image

. Its own image repository in {product-title}'s
xref:../../architecture/infrastructure_components/image_registry.adoc#integrated-openshift-registry[integrated
//from image-streams-faq/
An Image Stream contains all of the metadata information about any given image that is specified in the Image Stream specification.
Copy link
Contributor

Choose a reason for hiding this comment

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

this sentence seems redundant, all it says is "an imagestream contains the information that is specified in the imagestream"

I think it would be more useful to combine this w/ the next sentence and say "An imagestream does not contain actual image data, it is simply a mapping between tags and the actual images. It can contain additional metadata that describes the tags provided by the imagestream."

----

<1> The name of the image stream.
<2> The image source (repository or other image stream).
Copy link
Contributor

Choose a reason for hiding this comment

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

that field can only take on a repository value, it can't be an imagestream. i'm not really sure what purpose status.dockerImageRepository even serves, since each status.tag indicates where the tag comes from. @soltysh ?

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 again connected with already depreacated .spec.dockerImageRepository, but you're right this is just repo, you can pull image from. Usually cluster internal link, but recently with addition of public pull spec (openshift/origin#15853) this can give you pullable docker image (from outside the cluster)


<1> The name of the image stream.
<2> The image source (repository or other image stream).
<3> The name of the external image to use.
Copy link
Contributor

Choose a reason for hiding this comment

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

"the sha identifier that this imagestream tag currently references and which will be used by resources that reference this imagestream tag"

<1> The name of the image stream.
<2> The image source (repository or other image stream).
<3> The name of the external image to use.
<4> The image tag.
Copy link
Contributor

Choose a reason for hiding this comment

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

the imagestream tag.

* If the source image changes, the Image Stream will still point to a known-good version of the image, ensuring that your application will not break unexpectedly.

However, if an image author pushes a newer version of an image without properly tagging the image, it can accidentally create a new distinct image (with newer version information).
This condition can impact applications in unexpected ways.
Copy link
Contributor

Choose a reason for hiding this comment

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

this needs to elaborate on what it means to "push an image without properly tagging it" (and how/why that is problem since just above we claimed the imagestream insulates you from this)

However, if an image author pushes a newer version of an image without properly tagging the image, it can accidentally create a new distinct image (with newer version information).
This condition can impact applications in unexpected ways.

Also, use caution when using the `latest` taq in an image stream (as opposed to the version-specific tags). The `latest` tag will use the latest available version of the specified Image.
Copy link
Contributor

Choose a reason for hiding this comment

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

this a convention. our "latest" imagestreamtags specifically, are reference tags which follow another imagestreamtag and could be updated in the future to change what they follow (much like a symlink. our latest tag is a symlink to v2.4, in the future we might change it to be a symlink to v2.5).

However users can create their own imagestreamtags named anything they want. And those imagestreamtags might or might not be reference-style tags.

In short, we need a deep discussion of reference-style tags, and this isn't the place to talk about the behavior of our specific imagestreams that happen to define latest in this way.

Copy link
Contributor

Choose a reason for hiding this comment

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

Also in general throughout this document it's critical to be extremely clear as to whether you are talking about a "docker image tag" or a "imagestream tag" because they are two different things with different implications.

Users, without permission to read or list images on the cluster level, can still
retrieve the images tagged in a project they have access to using this resource.
Users that lack permission to read or list images on the cluster level can still
retrieve the images tagged in a project using this image streams.
Copy link
Contributor

Choose a reason for hiding this comment

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

s/this//

//from FAQ
For example, xref:../dev_guide/builds/triggering_builds.adoc#image-change-triggers[Builds] and
xref:../dev_guide/deployments/basic_deployment_operations.adoc#image-change-trigger[Deployments] can be automatically started when an Image Stream is modified.
This is achieved by monitoring that particular Image Stream and notifying the controller (the Build or Deployment) when a change was detected.
Copy link
Contributor

Choose a reason for hiding this comment

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

"monitoring that particular Image Stream Tag"


//from FAQ
For example, xref:../dev_guide/builds/triggering_builds.adoc#image-change-triggers[Builds] and
xref:../dev_guide/deployments/basic_deployment_operations.adoc#image-change-trigger[Deployments] can be automatically started when an Image Stream is modified.
Copy link
Contributor

Choose a reason for hiding this comment

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

Image Stream Tag

@@ -175,17 +175,51 @@ endif::[]
[[image-streams]]
== Image Streams

//from https://blog.openshift.com/image-streams-faq/
An Image Stream is a pointer to an image using various identifying qualities. This means that even if the source image changes,
the Image Stream will still point to a known-good version of the image, ensuring that your application will not break unexpectedly.
Copy link
Member

Choose a reason for hiding this comment

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

Unless you, either:

  1. have scheduled import set
  2. manually re-import the image.

I think it's worth mentioning that.

A SHA code that can be used to pull an image. For example:
*docker.io/openshift/jenkins-2-centos7@sha256:ab312bda324*.

Imagestream::
Copy link
Member

Choose a reason for hiding this comment

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

Image Stream

An {product-title} object that comprises any number of Docker-formatted container images identified by tags.
See xref:image-streams[Image Streams] below.

Imagestream tag::
Copy link
Member

Choose a reason for hiding this comment

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

Image Stream Tag

Imagestream tag::
A named pointer to an image in an image stream. See xref:image-stream-tag[Image Stream Tag] below.

Imagestream image::
Copy link
Member

Choose a reason for hiding this comment

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

Image Stream Image

A named pointer to an image in an image stream. See xref:image-stream-tag[Image Stream Tag] below.

Imagestream image::
An image that allows you to retrieve an image from a particular image stream where it is tagged.
Copy link
Member

Choose a reason for hiding this comment

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

An object that allows you to retrieve a particular docker image from a particular image stream.

*docker.io/openshift/jenkins-2-centos7@sha256:ab312bda324*.

Imagestream::
An {product-title} object that comprises any number of Docker-formatted container images identified by tags.
Copy link
Member

Choose a reason for hiding this comment

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

An object that comprises any number of Image Stream Tags. IS per se does not have any docker images, only pointers to them.

----

<1> The name of the image stream.
<2> The image source (repository or other image stream).
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 again connected with already depreacated .spec.dockerImageRepository, but you're right this is just repo, you can pull image from. Usually cluster internal link, but recently with addition of public pull spec (openshift/origin#15853) this can give you pullable docker image (from outside the cluster)

An Image Stream is a pointer to an image using various identifying qualities. This means that even if the source image changes,
the Image Stream will still point to a known-good version of the image, ensuring that your application will not break unexpectedly.

An imagestream does not contain actual image data, it is simply a mapping between tags and the actual images.
Copy link
Member

Choose a reason for hiding this comment

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

image stream - two words.

Copy link
Member

Choose a reason for hiding this comment

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

mapping between tags and actual images

the Image Stream will still point to a known-good version of the image, ensuring that your application will not break unexpectedly.

An imagestream does not contain actual image data, it is simply a mapping between tags and the actual images.
It can contain additional metadata that describes the tags provided by the imagestream.
Copy link
Member

Choose a reason for hiding this comment

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

image stream

====
//Ben: i'm not really sure what purpose status.dockerImageRepository even serves, since each status.tag indicates where the tag comes from. @soltysh ?
Copy link
Member

Choose a reason for hiding this comment

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

Like I've mentioned elsewhere, we deprecated .spec.dockerImageRepository, @bparees did you deprecate the .status.dockerImageRepository along with the other?
Currently it should provide with a pull spec, usually cluster internal, unless there's a public url for the registry configured.

Copy link
Contributor

Choose a reason for hiding this comment

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

no, I didn't deprecate .status.dockerImageRepository but i'm glad you suggested it too because i proposed it to @smarterclayton and he explained to me all the reasons we can never do that (that it presents the target for pushes to the imagestream, ie the internal registry service ip)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@bparees @soltysh What does the user set for .status.dockerImageRepository?

Copy link
Contributor

Choose a reason for hiding this comment

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

the user doesn't set it, it gets set by the system. it will point to the internal registry service ip.

Copy link
Member

Choose a reason for hiding this comment

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

@bparees hmmm... I'm not sure if that is still true with our current abilities where each tag can point to a totally different backing repo. In which case we still should read that information per tag, imho. It's worth a second thought, I guess.

Copy link
Contributor

Choose a reason for hiding this comment

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

@soltysh yes I raised similar questions to @smarterclayton but the answer I got is that status.DockerImageRepository is the location where users can push to in the internal registry. I guess they already know where to push to if they want to update the external image (on dockerhub for example) but if they want to push to the imagestream directly to create new tags, status.DockerImageRepository is the registry host they'd push to to accomplish that.

I'm glad I'm not the only one confused by this, though :)

Using image streams has several significant benefits:

* You can tag, rollback a tag, and quickly deal with images, without having to re-push using the command line.
* You can trigger Builds and Deployments when new image is pushed to the registry, or schedule the import to do it later.
Copy link
Member

Choose a reason for hiding this comment

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

Triggering and scheduling should not be mixed in this way. The above sentence suggests you can specify a point in time when an image will be re-imported, but that's not true. Scheduled import is about having the image stream tag checked every X minutes (configured by cluster admin) and if the source image has changed that change will be picked up and reflected in image stream. That in turn can trigger Build and/or Deployment flow.

Copy link
Contributor

Choose a reason for hiding this comment

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

+1

import - refresh what this imagestreamtag points to
trigger - do something when an imagestreamtag changes

import can lead to a trigger, but so can other things. and import might not cause a trigger if nothing cares about that particular imagestreamtag.


* You can tag, rollback a tag, and quickly deal with images, without having to re-push using the command line.
* You can trigger Builds and Deployments when new image is pushed to the registry, or schedule the import to do it later.
* You can share images using fine-grained access and quickly distribute images across your teams.
Copy link
Member

Choose a reason for hiding this comment

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

fine-grained access control

An _image stream image_ allows you to retrieve an image from a particular image stream
where it is tagged.

The image stream image consists of two parts delimited by an `@` sign:
`<image stream name>@<image name>`. To refer to the image in the
Copy link
Member

Choose a reason for hiding this comment

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

<image stream name>@<image name> - maybe write image name/id. Although we use the name for the image object, it's actually docker image id, and people might get confused seeing name here, and seeing something like sha256:47463d94eb5c049b2d23b03a9530bf944f8f967a0fe79147dd6b9135bf7dd13d

[[image-stream-triggers]]
=== Image Stream Triggers

Image change triggers allow your build or deployment (via replication controller) to be automatically invoked when a new version of an upstream image is available.
Copy link
Member

Choose a reason for hiding this comment

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

your build or deployment (via replication controller)

That RC is not important in this context.

Copy link
Member

@soltysh soltysh left a comment

Choose a reason for hiding this comment

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

Another round of comments.

An _image stream is a pointer to an image using various identifying qualities. This means that even if the source image changes,
the image stream will still point to a known-good version of the image, ensuring that your application will not break unexpectedly.

Note that an image stream can be configured to periodically chack for updates (using the `--scheduled` tag) or you can start a
Copy link
Member

Choose a reason for hiding this comment

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

--scheduled flag on a tag.

the image stream will still point to a known-good version of the image, ensuring that your application will not break unexpectedly.

Note that an image stream can be configured to periodically chack for updates (using the `--scheduled` tag) or you can start a
new build manually by re-importing an image (using the `oc import-image` command).
Copy link
Member

Choose a reason for hiding this comment

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

or you can manually re-import an image

It has nothing to do with builds, here.

new build manually by re-importing an image (using the `oc import-image` command).

An image stream does not contain actual image data, it is simply a mapping between tags and actual images.
It can contain additional metadata that describes the tags provided by the imagestream.
Copy link
Member

Choose a reason for hiding this comment

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

image stream <- two words

* If the source image changes, the Image Stream will still point to a known-good version of the image, ensuring that your application will not break unexpectedly.

// https://access.redhat.com/solutions/3016781 Caveats around referencing latest tags
However, a general caveat is to understand what your ImageStreamTag is pointing to, and be careful if it changes what it points to".
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 not a caveat of using image streams, but docker images in general. IS are only affected with this rule the same way everything else using latest tag.

Copy link
Member

Choose a reason for hiding this comment

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

Acutally, IS bypass the problem of using latest by providing you a stable pointer, until the next import.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, this is another place where we really need a glossary to setup the concept of docker tags vs imagestream tags, because they have different characteristics that need to be understood.

(and imagestreamtags that "reference" another imagestreamtag are yet another level of complexity that needs to be explained, and that's where you get into the whole issue of "not using latest because latest could suddenly point to something new" (where it may or may not actually be called latest))

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@soltysh FYI. The wording "caveat" came from here, which was added as an External Tracker in the original BZ:
https://access.redhat.com/solutions/3016781


* You can tag, rollback a tag, and quickly deal with images, without having to re-push using the command line.
* You can trigger Builds and Deployments when new image is pushed to the registry.
* You can periodically reimport images on a defined schedule. If the source image has changed, that change is picked up and reflected in image stream and
Copy link
Member

Choose a reason for hiding this comment

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

* You can tag, rollback a tag, and quickly deal with images, without having to re-push using the command line.
* You can trigger Builds and Deployments when new image is pushed to the registry.
* You can periodically reimport images on a defined schedule. If the source image has changed, that change is picked up and reflected in image stream and
trigger the Build and/or Deployment flow.
Copy link
Member

Choose a reason for hiding this comment

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

and can trigger a Build and/or Deployment

Copy link
Member

Choose a reason for hiding this comment

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

If it triggers is dependent on Build/Deployment configuration.

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah again the concept of triggering builds/deployments should really be called out as its own section. It is only tangentially related to managing/maintaining/updating imagestreams+imagestreamtags.

@bparees
Copy link
Contributor

bparees commented Sep 29, 2017

@bmcelvee @sferich888 @mburke5678 if you guys are interested, i'd be happy to have a 15-30 minute BJ session w/ you guys to walk through docker images vs imagestreams vs imagestreamtags, reference tags, etc, if you think it would help you revise this doc.

I might want @soltysh to keep me honest though.

@mburke5678
Copy link
Contributor Author

mburke5678 commented Oct 2, 2017

Added Working with Image Streams using the Practice section from the Image Stream FAQ docs.

Also, I created the Image Streams section as its own topic to see how folks thought that might work.

@soltysh
Copy link
Member

soltysh commented Oct 3, 2017

I might want @soltysh to keep me honest though.

If you need me as well, just ping me :)

Copy link
Member

@soltysh soltysh left a comment

Choose a reason for hiding this comment

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

More comments.

@@ -175,17 +175,58 @@ endif::[]
[[image-streams]]
== Image Streams

//from https://blog.openshift.com/image-streams-faq/
An _image stream is a pointer to an image using various identifying qualities. This means that even if the source image changes,
Copy link
Member

Choose a reason for hiding this comment

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

_image stream_ <- I think you're missing closing underscore

the image stream will still point to a known-good version of the image, ensuring that your application will not break unexpectedly.

Note that an image stream can be configured to periodically chack for updates (using the `--scheduled` flag on a tag)
or you can re-importing an image (using the `oc import-image` command).
Copy link
Member

Choose a reason for hiding this comment

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

s/re-importing/re-import

A label applied to a Docker image in a repository that distinguish specific images. For example, here *latest* is a tag:
*docker.io/openshift/jenkins-2-centos7:latest*

Docker image sha::
Copy link
Member

Choose a reason for hiding this comment

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

s/Docker image sha/Docker image id

SHA is a shorthand for secure hashing algorithm, but the name most frequently use is ID here.

See xref:image-stream-image[Image Stream Images] below.

Image stream trigger::
A trigger causes a specific action when an image stream tag changes. Importing an image can be a trigger, along with other things. An import only causes a trigger if an image stream is following the associated image stream tag. See xref:image-stream-triggers[Image Stream Triggers] below.
Copy link
Member

Choose a reason for hiding this comment

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

Import causes a trigger to fire only when there are deployments, builds or other resources listening for those.


<1> The name of the image stream.
<2> The image source repository.
<3> The the internal registry service IP address, which is the target for pushes to the image stream. This valueis set automatically.
Copy link
Member

Choose a reason for hiding this comment

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

The the internal...

Copy link
Member

Choose a reason for hiding this comment

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

This value (space) is set...

[[image-stream-triggers]]
=== Image Stream Triggers

Image change triggers allow your build or deployment to be automatically invoked when a new version of an upstream image is available.
Copy link
Member

Choose a reason for hiding this comment

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

@bparees I think we need a piece of doc about the generic trigger. Both @mfojtik and @tnozicka where asking me about it earlier today.

Tag python:3.6 set to import docker.io/python:3.6.0 periodically.
----

This command causes {product-title} to periodiallly update this particular image stream tag should. This period is a cluster-wide setting is set to 15 minutes by default.
Copy link
Member

Choose a reason for hiding this comment

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

Maybe link to master-config describing this?


[[image-streams]]
//from https://blog.openshift.com/image-streams-faq/
An _image stream is a pointer to an image using various identifying qualities. This means that even if the source image changes,
Copy link
Member

Choose a reason for hiding this comment

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

Missing closing underscore

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Rewrote that paragraph

include::dev_guide/deployments/basic_deployment_operations.adoc[tag=image-change-trig]

[[image-stream-mappings]]
== Image Stream Mappings
Copy link
Member

Choose a reason for hiding this comment

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

Can this be marked as an advanced topic? Regular users don't need to bother with those implementation details.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added a note below.
"Configuring image stream mappings is an advanced feature."
@soltysh
Do we want to define when a user would need to create an image stream mapping?

To remove the periodical check, re-run above command but omit the --scheduled flag. This will reset its behavior to default.

----
oc tag <repositiory/image> <image-name:tag>
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 have this describe in only one document and all others will be only pointing to it? I'm confused now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@soltysh Not sure what you are asking. Do we want to move the "working with" concepts into the introductory sections? For ex. this command would go into the "Image Stream Tag" section?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@soltysh Bump ^^

@mburke5678
Copy link
Contributor Author

@zhouying7780 Please take a look at architecture/core_concepts/builds_and_image_streams.adoc. All suggested changes are in that file.
The architecture/core_concepts/mage_streams.adoc is an experiment.

xref:../../architecture/infrastructure_components/image_registry.adoc#integrated-openshift-registry[integrated
// http://redhatgov.io/workshops/security_openshift/exercise1.3/
An _image stream_ can automatically perform an action when new images are created. Builds and deployments can watch an image stream
to receive notifications when new images are added and react by performing a build or deployment, respectively.
Copy link
Contributor

Choose a reason for hiding this comment

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

the image stream isn't performing an action. deploymentconfigs+buildconfigs are choosing to watch the imagestream for changes and then take some action if it does change.

<1> The name of the image stream.
<2> The image source repository.
<3> The internal registry service IP address, which is the target for pushes to the image stream. This value is set automatically.
<3> The SHA identifier that this image stream tag currently references. Resources that reference this image stream tag use this identifier.

Choose a reason for hiding this comment

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

Couldn't find the 'The SHA identifier that this image stream tag currently references' ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@zhouying7780 Thank you. I fixed the call-out numbering. The SHA identifier is <4>:
image: sha256:909de62d1f609a717ec433cc25ca5cf00941545c83a01fb31527771e1fab3fc5 <4>

is often abbreviated as _istag_. An image stream tag is used to reference or retrieve
an image for a given image stream and tag.

Image stream taga can reference any local or externally

Choose a reason for hiding this comment

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

Should be "Image stream tag"

@mburke5678
Copy link
Contributor Author

@soltysh @bparees Do you have time to take another look? I have made some changes since you last reviewed.

@@ -175,29 +175,143 @@ endif::[]
[[image-streams]]
== Image Streams

An _image stream_ comprises any number of
Copy link
Contributor

Choose a reason for hiding this comment

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

this whole file needs to be renamed, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@bparees Yeah, I think that the Image Stream section should be its own page. I will see what the others think. You have any thoughts?

Copy link
Contributor

Choose a reason for hiding this comment

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

yes they should be split out (also you seem to have updated the table of contents to imply there would only be an images page? but i guess you'll want to add a builds entry to the table of contents).

Maybe do that in a follow up PR though, so we can keep this one to getting the content right? There's been a lot of good discussion/review and i don't want to muddy the waters further.

You can think of an image stream as a wrapper or abstraction
for Docker images to see what images are available and to ensure that you are using the specific image you need even if the image in
the repository changes.
Image streams do not contain actual image data, but presenta single virtual view of related images, similar to an image repository.
Copy link
Contributor

Choose a reason for hiding this comment

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

presenta->present a

related images, similar to an image repository, and may contain images from any
of the following:
An _image stream_ is a mapping between tags in {product-title} objects and
xref:../../architecture/core_concepts/containers_and_images.adoc#docker-images[Docker image] images.
Copy link
Contributor

Choose a reason for hiding this comment

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

"An image stream and its associated tags provide an abstraction for referencing Docker images from within OpenShift."

xref:../../architecture/core_concepts/containers_and_images.adoc#docker-images[Docker image] images.
You can think of an image stream as a wrapper or abstraction
for Docker images to see what images are available and to ensure that you are using the specific image you need even if the image in
the repository changes.
Copy link
Contributor

Choose a reason for hiding this comment

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

"The image stream and its tags allow you to see what images are available and ensure that you are using the specific image you need even if the image in the repository changes."


. Its own image repository in {product-title}'s
xref:../../architecture/infrastructure_components/image_registry.adoc#integrated-openshift-registry[integrated
Yoyu can configure xref:../dev_guide/builds/triggering_builds.adoc#image-change-triggers[Builds] and
Copy link
Contributor

Choose a reason for hiding this comment

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

Yoyu/you.


Image stream trigger::
A trigger that causes a specific action when an image stream tag changes. For example, importing an image can be a trigger.
Importing causes a trigger to fire when there are Deployments, Buildss or other resources listening for those. See xref:image-stream-triggers[Image Stream Triggers] below.
Copy link
Contributor

Choose a reason for hiding this comment

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

importing is not the trigger.

the trigger is "the value of the tag changed". importing can cause the value of the tag to change, but so can pushing a new image to the tag.

Copy link
Contributor

Choose a reason for hiding this comment

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

above comment still valid (importing is not a trigger, importing can cause the value of the tag to change, which is a trigger if it happens).

also s/Buildss/Builds/

+
[NOTE]
====
Tracking tags are limited to a single image stream and cannot reference other image streams.
Copy link
Contributor

Choose a reason for hiding this comment

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

i'm not sure what this means, hopefully @soltysh can clarify.

Copy link
Contributor

Choose a reason for hiding this comment

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

bump @soltysh

generation: 1
image: sha256:47463d94eb5c049b2d23b03a9530bf944f8f967a0fe79147dd6b9135bf7dd13d
tag: latest
----
====

[[image-stream-triggers]]
=== Image Stream Triggers
Copy link
Contributor

Choose a reason for hiding this comment

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

image stream change triggers

----

[[image-stream-mappings-working-adding-tags]]
==== Adding Tags to an External Image
Copy link
Contributor

Choose a reason for hiding this comment

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

s/to/for/


Docker repository::
A central location for uploading and downloading images.
For example, the OpenShift Jenkins images are in a Docker registry: *docker.io/openshift/jenkins-2-centos7:latest*.
Copy link
Contributor

Choose a reason for hiding this comment

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

since this glossary appears twice i'm not sure what i'm reviewing anymore. i'm stopping here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@bparees Sorry. This comment must have gotten lost. I was thinking of breaking the Builds and Image Stream topic into two topics. This file is a test and I have not updated it for some time.

Copy link
Contributor

Choose a reason for hiding this comment

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

can you create a PR where I can actually see the proposed changes, then? this is really frustrating to try to review in its current state.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@bparees All proposed changes are in architecture/core_concepts/builds_and_image_streams.adoc. I removed the extraneous document.

notifications when new images are added and react by performing a build or
deployment, respectively. For a
curated set of image streams, see the
The following image stream contains two tags: `34` which points to a Python v3.4 image and `35` which points to a Python v3.5 image:
Copy link
Contributor

Choose a reason for hiding this comment

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

this seems out of place since the example imagestream is two paragraphs down.

The following image stream contains two tags: `34` which points to a Python v3.4 image and `35` which points to a Python v3.5 image:

When you define an object that references an image stream tag, you point to an image stream tag, not the Docker repository. When you build or deploy
your application, {product-title} queries the Docker repository using the image stream tag to locate the specific ID of the image and use that
Copy link
Contributor

Choose a reason for hiding this comment

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

s/use/uses/


Docker repository::
A central location for uploading and downloading images.
For example, the OpenShift Jenkins images are in a Docker registry:
Copy link
Contributor

Choose a reason for hiding this comment

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

s/registry/repository/

And should add another entry for "docker registry": a content server that can store and service images from docker repositories. example being registry.access.redhat.com

----

Docker image::
A reference to an image for a given external registry. It uses the standard Docker pull specification for its name.
Copy link
Contributor

Choose a reason for hiding this comment

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

Docker image: A specific set of content that can be run as a container. Usually associated with a particular tag within a docker repository.

=== Important terms

Docker repository::
A central location for uploading and downloading images.
Copy link
Contributor

Choose a reason for hiding this comment

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

Replace with: "A collection of related docker images and tags identifying them"

=== Image Stream Images

An _image stream image_ points from within an image stream
to a particular external image ID. It is often abbreviated as _isimage_.
Copy link
Contributor

Choose a reason for hiding this comment

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

s/external//

An _image stream image_ points from within an image stream
to a particular external image ID. It is often abbreviated as _isimage_.

Image stream images allows you to retrieve an image from a particular image stream
Copy link
Contributor

Choose a reason for hiding this comment

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

allows you to retrieve metadata about an image from a particular image stream.


* _Tracking tags_ are reference tags that follow another image stream tag and could be updated in the future to change which image they follow, much like a symlink. Note that these new levels are not guaranteed to be backwards-compatible.
+
For example, the `latest` image stream tags that ship with {product-title} are tracking tags. This means consumers of the `latest` image stream tag will be updated to the newest level of the framework provided by the image when a new level becomes available. A `latest` image stream tag to v3.6 could be changed to v3.7 at any time. It is important to be aware that the `latest` image stream tag behaves differently than the Docker `latest` tag. The `latest` image stream tag does not point to the latest image in the Docker repository. It points to another image stream tag that might not be the latest version of an image. For example, if the `latest` image stream tag points to v3.2 of an image, when the 3.3 version is released, the `latest` tag is not automatically updated to v3.3, and remains at v3.2 until it is manually updated.
Copy link
Contributor

Choose a reason for hiding this comment

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

The latest image stream tag does not point to the latest image in the Docker repository.

The latest image stream tag does not, in this case, point to the latest image in the Docker repository.

Copy link
Contributor

Choose a reason for hiding this comment

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

It is important to be aware that the latest image stream tag behaves differently than the Docker latest tag.

It is important to be aware that these latest image stream tags behaves differently than the Docker latest tag.

Copy link
Contributor

Choose a reason for hiding this comment

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

For example, if the latest image stream tag points to v3.2 of an image, when the 3.3 version is released, the latest tag is not automatically updated to v3.3, and remains at v3.2 until it is manually updated.

For example, if the latest image stream tag points to an image stream tag for v3.2 of an image, when the 3.3 version is released, the latest tag is not automatically updated to v3.3, and remains at v3.2 until it is manually updated to point to a v3.3 image stream tag.

+
[NOTE]
====
Tracking tags are limited to a single image stream and cannot reference other image streams.
Copy link
Contributor

Choose a reason for hiding this comment

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

bump @soltysh

Tag python:latest set to python@sha256:49c18358df82f4577386404991c51a9559f243e0b1bdc366df25.
----

Use the `oc describe` command to confirm the the image stream has two tags, one (`3.5`) pointing at the external Docker image and another tag (`latest`) pointing to a different tag in the same image stream.
Copy link
Contributor

Choose a reason for hiding this comment

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

and another tag (latest) pointing to a different tag in the same image stream.

and another tag (latest) pointing to the same image because it was created based on the first tag.

@mburke5678
Copy link
Contributor Author

@bparees Do you have a sample build config and/or deployment config that points to an image stream? Might like to add a sample of how the build/deploy references the image stream.
The Build Inputs -> Image Source section has a buildconfig that uses source.images.from.kind:ImageStreamTag.
https://docs.openshift.com/container-platform/3.6/dev_guide/builds/build_inputs.html#image-source


* If the source image changes, the image stream tag will still point to a known-good version of the image, ensuring that your application will not break unexpectedly.

* You can configure security around who can view and use the images through permissions on the image stream objects.
Copy link
Contributor Author

@mburke5678 mburke5678 Oct 27, 2017

Choose a reason for hiding this comment

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

@bparees Do you know if we cover this in the docs? Not sure what I am looking for in how to set image permissions.

Copy link
Contributor

Choose a reason for hiding this comment

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

probably not explicitly for imagestreams, they are controlled in the same way access is controlled to any resource: https://docs.openshift.org/latest/admin_guide/manage_authorization_policy.html


Image stream image::
An image that allows you to retrieve a specific Docker image from a particular image stream where it is tagged.
See xref:image-stream-image[Image Stream Images] below.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@bparees Is an image stream image simply an image that is referenced in an image stream?

Copy link
Contributor

Choose a reason for hiding this comment

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

an "imagestreamimage" is an api resource object which pulls together some metadata about a particular image sha.

and yes it mostly exists because there is an imagestream that contains a tag that is currently pointing to that particular image sha.

@mburke5678
Copy link
Contributor Author

@bparees Is there a general workflow that we can include:

  1. In Docker build an image with tag(s).
  2. In OCP Create an image stream pointing to the tag.
  3. Create a build config or deploy config that used that image stream as a source

@bparees
Copy link
Contributor

bparees commented Oct 27, 2017

@bparees
Copy link
Contributor

bparees commented Oct 27, 2017

@bparees Is there a general workflow that we can include:
In Docker build an image with tag(s).
In OCP Create an image stream pointing to the tag.
Create a build config or deploy config that used that image stream as a source

I really don't want to get sidetracked into this discussion. We are fixing the documentation of what imagestreams/tags are, not how to use them in a DC or a BC.

xref:../../architecture/infrastructure_components/image_registry.adoc#integrated-openshift-registry[integrated
Image streams do not contain actual image data, but present a single virtual view of related images, similar to an image repository.

You can configure xref:../dev_guide/builds/triggering_builds.adoc#image-change-triggers[Builds] and
Copy link
Contributor

Choose a reason for hiding this comment

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

The Builds and Deployment links are broken.

For example, if a Deployment is using a certain image and a new version of that image is created,
a Deployment could be automatically performed to pick up the new version of the image.

However, if the image stream tag used by the deployment or build is not updated,
Copy link
Contributor

Choose a reason for hiding this comment

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

s/deployment/Deployment (for consistency)

Copy link
Contributor

Choose a reason for hiding this comment

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

Also for build/deployment

a Deployment could be automatically performed to pick up the new version of the image.

However, if the image stream tag used by the deployment or build is not updated,
then even if the docker image in the docker registry is updated, the build/deployment will continue using the previous (presumably known good) image.
Copy link
Contributor

Choose a reason for hiding this comment

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

s/docker/Docker

notifications when new images are added and react by performing a build or
deployment, respectively. For a
curated set of image streams, see the
When you define an object that references an image stream tag (such as a or build configuration or deployment configuration), you point to an image stream tag, not the Docker repository. When you build or deploy your application, {product-title} queries the Docker repository using the image stream tag to locate the associated ID of the image and uses that
Copy link
Contributor

Choose a reason for hiding this comment

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

s/such as a or build configuration or deployment/such as a Build configuration or Deployment...

Copy link
Contributor

Choose a reason for hiding this comment

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

s/build/Build; s/deploy/Deploy

====

Docker image ID::
A SHA code that can be used to pull an image. For example:
Copy link
Contributor

Choose a reason for hiding this comment

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

Since this is the first reference to SHA in this doc, do you think it needs to be defined? If it's common knowledge, it could slide.

in the `Strategy` stanza of the configuration.

For a sample deployment configuration that references an image stream,
see xref:../../dev_guide/deployments/how_deployments_work.html#creating-a-deployment-configuration[Creating a Deployment Configuration]
Copy link
Contributor

Choose a reason for hiding this comment

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

The Creating a Deployment Configuration link is broken

@soltysh
Copy link
Member

soltysh commented Nov 14, 2017

LGTM

@mburke5678
Copy link
Contributor Author

mburke5678 commented Nov 15, 2017

Email exchange:
Michael Burke | 11:39 AM (21 hours ago)
The OCP 3.2 release notes mention oc tag --scheduled
"To set an image to be imported automatically, use the --scheduled flag with the oc tag command:"
https://docs.openshift.com/enterprise/3.2/release_notes/ose_3_2_release_notes.html#ose-32-image-imports.

Maciej Szulik | 4:00 PM (17 hours ago)
In that case we're good :)

@mburke5678 mburke5678 merged commit f6f450d into openshift:master Nov 15, 2017
mburke5678 added a commit to mburke5678/openshift-docs that referenced this pull request Nov 15, 2017
mburke5678 added a commit to mburke5678/openshift-docs that referenced this pull request Nov 15, 2017
mburke5678 added a commit to mburke5678/openshift-docs that referenced this pull request Nov 15, 2017
mburke5678 added a commit to mburke5678/openshift-docs that referenced this pull request Nov 15, 2017
mburke5678 added a commit to mburke5678/openshift-docs that referenced this pull request Nov 15, 2017
@mburke5678 mburke5678 deleted the BZ-1446644 branch November 15, 2017 15:50
@mburke5678
Copy link
Contributor Author

[rev_history]
|xref:../architecture/core_concepts/builds_and_image_streams.adoc#architecture-core-concepts-builds-and-image-streams[Builds and Image Streams]
|Added more information to the xref:../architecture/core_concepts/builds_and_image_streams.adoc#image-streams[Image Streams] section.
%

@vikram-redhat vikram-redhat modified the milestones: Next Release, Staging Nov 20, 2017
[[image-stream-configure]]
=== Configuring Image Streams

ifdef::openshift-origin,openshift-online,openshift-enterprise,openshift-dedicated[]
Copy link
Contributor

@vikram-redhat vikram-redhat Nov 21, 2017

Choose a reason for hiding this comment

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

@mburke5678 - something is not right here. This ifdef doesn't have a closing endif. Also, this seems to cover almost all distros that we have. Does it, and the next ifdef, need to be here if it applies to origin, enterprise, dedicated and online?

Copy link
Contributor Author

@mburke5678 mburke5678 Nov 21, 2017

Choose a reason for hiding this comment

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

@vikram-redhat That ifdef was in the file when I started on this issue. I thought the same thing; but, assumed that someone knew better than I. Same with the following one.
Looks like it was added here: Update for atomic registry use case

Thank you for adding the endif back.

----

This command causes {product-title} to periodically update this particular image stream tag. This period is a
xref:../../install_config/master_node_configuration.adoc#master-config-image-config[cluster-wide setting] set to 15 minutes by default.
Copy link
Contributor

Choose a reason for hiding this comment

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

@mburke5678 because this goes into the dedicated and online branches, it should have been conditionalized for enterprise and origin branches only. I have fixed it for dedicated and online.

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

7 participants