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

Mechanism to determine if image/manifests is updated #545

Closed
jlewi opened this issue Dec 13, 2019 · 3 comments
Closed

Mechanism to determine if image/manifests is updated #545

jlewi opened this issue Dec 13, 2019 · 3 comments

Comments

@jlewi
Copy link
Contributor

jlewi commented Dec 13, 2019

In order to enable continuous delivery of our docker images and our kustomize manifests (#450)
We need a way to keep track of the source commit from which an image was built so we can determine if it is outdated.

There are a couple ways we could do this

@jlewi
Copy link
Contributor Author

jlewi commented Dec 13, 2019

It looks like kaniko can support multiple tags just by adding multiple --destination flags
https://github.com/GoogleContainerTools/kaniko/blob/master/README.md

jlewi pushed a commit to jlewi/testing that referenced this issue Dec 20, 2019
* kubeflow/testing is the central repository where all reusable engprod
  code goes. As a result it makes sense for the reusable Tekton definitions
  and scripts related to continuous building and updating of Kubeflow
  applications to live here

* For now, we will also centralize the definition of pipelines for all
  applications in this repository (as opposed to having them live in
  the application repositories).

  * This should make it easier to manage and automatically update
    all applications.

* Per kubeflow#544 redo how we use kustomize and Tekton to
  parameterize the pipelines.

  * Individual runs of pipelines will rely completely on Tekton parameter
    substitution to create a run to build an image for a specific
    application at a specific commit.

    * The image URL and git commit of source code will be Tekton
      PipelineResources that are inlined in the PipelineRun

    * For any parameters we will use Tekton parameters and inline the values
      in the PipelineRun

  * PipelineRuns will just be created as YAML files and not as kustomize
    overlays

  * Right now we have a single kustomize package which defines the reusable
    elements which are Tekton Tasks and Pipeline resources

    * Right now we have a single Pipeline for all applications but in the future
      we might have application specific pipelines

* rebuild_manifests.sh should use the image tag v0.x.y-${commit} rather
      than the digest.

   * This image tagging scheme will be the basis for determining whether
     the image is already up to date (kubeflow#545)

   * since we now specify the full image_url rather than using image name
     we need a parameter for the src_image that is used with the kustomize
     edit function.
jlewi pushed a commit to jlewi/testing that referenced this issue Dec 20, 2019
* kubeflow/testing is the central repository where all reusable engprod
  code goes. As a result it makes sense for the reusable Tekton definitions
  and scripts related to continuous building and updating of Kubeflow
  applications to live here

* For now, we will also centralize the definition of pipelines for all
  applications in this repository (as opposed to having them live in
  the application repositories).

  * This should make it easier to manage and automatically update
    all applications.

* Per kubeflow#544 redo how we use kustomize and Tekton to
  parameterize the pipelines.

  * Individual runs of pipelines will rely completely on Tekton parameter
    substitution to create a run to build an image for a specific
    application at a specific commit.

    * The image URL and git commit of source code will be Tekton
      PipelineResources that are inlined in the PipelineRun

    * For any parameters we will use Tekton parameters and inline the values
      in the PipelineRun

  * PipelineRuns will just be created as YAML files and not as kustomize
    overlays

  * Right now we have a single kustomize package which defines the reusable
    elements which are Tekton Tasks and Pipeline resources

    * Right now we have a single Pipeline for all applications but in the future
      we might have application specific pipelines

* rebuild_manifests.sh should use the image tag v0.x.y-${commit} rather
      than the digest.

   * This image tagging scheme will be the basis for determining whether
     the image is already up to date (kubeflow#545)

   * since we now specify the full image_url rather than using image name
     we need a parameter for the src_image that is used with the kustomize
     edit function.

* Use a separate task for updating the manifests

  * Now that we are using image tags of the form "{TAG}-{COMMIT}" which
    is determined at pipeline construction time; we no longer
    need to pass the digest file between the build-push step and the
    update manifests task which makes it much easier to run
    them as separate task since we don't need a pod volume to share data.

Related to kubeflow#450 - CD pipelines for Kubeflow.
jlewi pushed a commit to jlewi/testing that referenced this issue Dec 21, 2019
* kubeflow/testing is the central repository where all reusable engprod
  code goes. As a result it makes sense for the reusable Tekton definitions
  and scripts related to continuous building and updating of Kubeflow
  applications to live here

* For now, we will also centralize the definition of pipelines for all
  applications in this repository (as opposed to having them live in
  the application repositories).

  * This should make it easier to manage and automatically update
    all applications.

* Per kubeflow#544 redo how we use kustomize and Tekton to
  parameterize the pipelines.

  * Individual runs of pipelines will rely completely on Tekton parameter
    substitution to create a run to build an image for a specific
    application at a specific commit.

    * The image URL and git commit of source code will be Tekton
      PipelineResources that are inlined in the PipelineRun

    * For any parameters we will use Tekton parameters and inline the values
      in the PipelineRun

  * PipelineRuns will just be created as YAML files and not as kustomize
    overlays

  * Right now we have a single kustomize package which defines the reusable
    elements which are Tekton Tasks and Pipeline resources

    * Right now we have a single Pipeline for all applications but in the future
      we might have application specific pipelines

* rebuild_manifests.sh should use the image tag v0.x.y-${commit} rather
      than the digest.

   * This image tagging scheme will be the basis for determining whether
     the image is already up to date (kubeflow#545)

   * since we now specify the full image_url rather than using image name
     we need a parameter for the src_image that is used with the kustomize
     edit function.

* Use a separate task for updating the manifests

  * Now that we are using image tags of the form "{TAG}-{COMMIT}" which
    is determined at pipeline construction time; we no longer
    need to pass the digest file between the build-push step and the
    update manifests task which makes it much easier to run
    them as separate task since we don't need a pod volume to share data.

Related to kubeflow#450 - CD pipelines for Kubeflow.
k8s-ci-robot pushed a commit that referenced this issue Dec 27, 2019
* kubeflow/testing is the central repository where all reusable engprod
  code goes. As a result it makes sense for the reusable Tekton definitions
  and scripts related to continuous building and updating of Kubeflow
  applications to live here

* For now, we will also centralize the definition of pipelines for all
  applications in this repository (as opposed to having them live in
  the application repositories).

  * This should make it easier to manage and automatically update
    all applications.

* Per #544 redo how we use kustomize and Tekton to
  parameterize the pipelines.

  * Individual runs of pipelines will rely completely on Tekton parameter
    substitution to create a run to build an image for a specific
    application at a specific commit.

    * The image URL and git commit of source code will be Tekton
      PipelineResources that are inlined in the PipelineRun

    * For any parameters we will use Tekton parameters and inline the values
      in the PipelineRun

  * PipelineRuns will just be created as YAML files and not as kustomize
    overlays

  * Right now we have a single kustomize package which defines the reusable
    elements which are Tekton Tasks and Pipeline resources

    * Right now we have a single Pipeline for all applications but in the future
      we might have application specific pipelines

* rebuild_manifests.sh should use the image tag v0.x.y-${commit} rather
      than the digest.

   * This image tagging scheme will be the basis for determining whether
     the image is already up to date (#545)

   * since we now specify the full image_url rather than using image name
     we need a parameter for the src_image that is used with the kustomize
     edit function.

* Use a separate task for updating the manifests

  * Now that we are using image tags of the form "{TAG}-{COMMIT}" which
    is determined at pipeline construction time; we no longer
    need to pass the digest file between the build-push step and the
    update manifests task which makes it much easier to run
    them as separate task since we don't need a pod volume to share data.

Related to #450 - CD pipelines for Kubeflow.
@stale
Copy link

stale bot commented Mar 12, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in one week if no further activity occurs. Thank you for your contributions.

@jlewi
Copy link
Contributor Author

jlewi commented Mar 17, 2020

Closing this. Our apps-cd pipeline has figured out a solution.

@jlewi jlewi closed this as completed Mar 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant