Skip to content
Dennis Rodewyk edited this page Dec 3, 2018 · 1 revision

How MunkiMagic works

diagram

Manifests are modified or added to the local Munki repository and then pushed to the git repository in CodeCommit by a Munki Admin. New packages are then synced to the Munki bucket by executing ./sync-pkgs from within the local Munki repository.

The CodePipeline kicks in as soon as changes are pushed to the Munki repository in CodeCommit. It stores the following two artifacts in the ArtifactStoreBucket:

  1. MunkiRepoSourceArtifact from the Munki CodeCommit repository

  2. SyncScriptsSourceArtifact, containing

    1. buildspec.yml for the CodeBuild container
    2. makecatalogs, which is used to make the catalogs from the manifests and pkgsinfo directories that are contained in the MunkiRepoSourceArtifact
    3. sync_repo.sh, which is executed in the CodeBuild container

When the CodeBuild container executes sync_repo.sh it

  1. syncs pkgsinfo and manifests to Munki S3 Bucket
    • aws sync s3 ${pkginfos_dir} s3://${MunkiS3Bucket}/pkgsinfo
    • aws sync s3 ${manifests_dir} s3://${MunkiS3Bucket}/manifests
  2. makes the catalogs in the S3 Bucket with the help of the Munki s3Repo plugin
    • python client/makecatalogs -s --repo_url s3Repo --plugin s3Repo

As soon as the build finishes, the manifests and packages are available via sudo managedsoftwareupdate or Managed Software Center.

Check out the Demo page of the wiki to see MunkiMagic in action.

Clone this wiki locally