Giter Site home page Giter Site logo

Comments (3)

yuval-k avatar yuval-k commented on August 16, 2024

images should be cached, even if you use url - do you find this is not the case? are you using the latest version?

from packer-plugin-arm-image.

ChristianKniep avatar ChristianKniep commented on August 16, 2024

I want to use the outcome of a previous build to be used in a subsequent one.
The first downloads an image and sets up some basic things and might take a while and the second run will just change some config which should be rather fast.

from packer-plugin-arm-image.

ChristianKniep avatar ChristianKniep commented on August 16, 2024

Figured it out...
I renamed the image to prom_base.img and ran this.

{
  "variables": {},
  "builders": [
    {
      "type": "arm-image",
      "iso_url": "file:////build/output-arm-image/prom_base.img",
      "last_partition_extra_size": 1048576000,
      "iso_checksum_type": "md5",
      "iso_checksum": "6415daf45a89e98339180bd59de0ec12",
      "image_type": "raspberrypi",
      "image_mounts": ["/boot", "/"]

    }
  ],
  "provisioners": [
    {
        "type": "shell",
        "inline": [
            "mkdir -p /opt/build/samples"
        ]
    },{
        "type": "file",
        "source": "/build/samples/",
        "destination": "/opt/build/samples"
    },{
        "type": "shell",
        "inline": [
            "bash -x /opt/build/samples/scripts/prometheus_setup.sh",
            "bash -x /opt/build/samples/scripts/grafana_setup.sh",
            "bash -x /opt/build/samples/scripts/loki_setup.sh"
        ]
    },{
      "type": "shell",
      "inline": [
          "rm -rf /opt/build"
      ]
  }
  ]
}

Ran it like that...

docker run --rm --privileged
  -v ${PWD}:/build:ro -v ${PWD}/packer_cache:/build/packer_cache \
  -v ${PWD}/output-arm-image:/build/output-arm-image \
  packer-builder-arm build samples/raspbian_prom_setup.json

from packer-plugin-arm-image.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.