Skip to content
This repository has been archived by the owner on Jun 11, 2021. It is now read-only.

A concourse pipeline to create a Windows stemcell using stembuild cli.

Notifications You must be signed in to change notification settings

cloudfoundry-community/stembuild-concourse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deprecated!

Please use https://github.com/cloudfoundry-community/windows-stemcell-concourse

Concourse pipeline for stembuild

A collection of tasks that implement stembuild cli.

About

This is a Concourse pipeline with tasks to create a Windows stemcell for Cloud Foundry, using the stembuild cli. The stemcell can be used with Pivotal Application Service for Windows (PASW) and the windows cluster feature of Pivotal Container Service (PKS) as well.

Pre-reqs

The Concourse worker that runs these tasks needs to have access to https://github.com and https://network.pivotal.io. If your workers aren't allowed public access, you can modify the pipeline to "feed" the assets that are normally downloaded.

The stembuild cli expects the VM to be in a specific state. To get there, follow the documentation for creating vsphere stemcell with stembuild through Step 3. Once you have the cloned VM and it is powered on, use this pipeline to convert the VM to a stemcell.

Concourse screenshot

Getting Started

  1. You'll need 2 files from this repo, pipeline.yml and vars.yml. You can either clone the repo git clone https://github.com/cloudfoundry-community/stembuild-concourse or just grab the raw content.

  2. The pipeline has options of where things can be stored. Specifically S3 compatible, Google Cloud, or Azure store. The default is S3 compatible. If you would like to use a different store just comment/uncomment things in pipeline.yml.

  3. The vars.yml file will feed variables to the pipeline. Fill in the values appropriatly.

    Vcenter certificate

    The CA certs for vcenter are not optional. You can retrieve the cert by following this vmware doc.

  4. Using the fly cli, login to concourse, and set the pipeline with variables filled.

    Powershell Set Pipeline

    fly -t <MY-TARGET> set-pipeline `
      --pipeline create-windows-stemcell `
      --config .\pipeline.yml `
      --load-vars-from .\vars.yml
    

    Bash Set Pipeline

    fly -t <MY-TARGET> set-pipeline \
      --pipeline create-windows-stemcell \
      --config ./pipeline.yml \
      --load-vars-from ./vars.yml
  5. Looking at the prerequisites for running stembuild, you'll notice that LGPO needs to be downloaded and put in the same working folder. The pipeline has provisions for holding the zip using either S3 compatible, Google Cloud, or Azure store. Place the downloaded zip in the chosen store and the pipeline will manage the rest.

  6. Start the construct task to see the magic happen.

  7. Once both tasks have successfully run, the stemcell file will be uploaded to the chosen stemcell-store store. The pipeline has provisions for storing the stemcell using either S3 compatible, Google Cloud, or Azure store. You can use this store to trigger another Concourse pipeline that deploys to Cloud Foundry, or manually upload the stemcell into the library and deploy.

Keeping Stemcells Patched

Every month Microsoft releases patches (updates) for it's operating systems. Known as patch Tuesday. The stembuild team tests the cli against these new patches each month and releases a new minor version of the tool.

As a best practice, try to follow this pattern:

  1. Update the base stemcell VM on patch tuesday.
  2. Once all updates are finished, shutdown and clone the base VM. Name the clone to reflect the stembuild version that will be used, ie: 2019.3.41.
  3. When the new minor version of stembuild is released, start* this pipeline to create the stemcell.

Details about monthly stemcell upgrade can be found in the creating vsphere stemcell with stembuild documentation.

*If you would like to make the pipeline run automatically when a new release it posted, add trigger: true to get: stembuild-release in the construct job.

About

A concourse pipeline to create a Windows stemcell using stembuild cli.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages