Can I see an example please? On Sun, Dec 10, 2017 at 2:33 AM, Alvaro Miranda Aguilera <kiki...@gmail.com> wrote:
> you can mount the same folder in the docker or you can use a file > provisioner to copy them > > Alvaro. > > On Sat, Dec 9, 2017 at 9:50 PM, kant kodali <kanth...@gmail.com> wrote: > >> I am running packer build packer.json on my host machine and I believe >> salt-call is executing inside the docker container so how does it pickup my >> cassandra state files located in host machine (as you can see the path I >> specified in my packer.json in my previous email)? What steps I need to do? >> >> Thanks! >> >> On Saturday, December 9, 2017 at 12:38:31 PM UTC-8, kant kodali wrote: >>> >>> Hi Alvaro, >>> >>> I think I got that part ok(at least I am hoping). >>> >>> My packer.json is just this >>> >>> { >>> >>> "builders": [ >>> >>> { >>> >>> "type": "docker", >>> >>> "image": "enonic/docker-salt-masterless-ubuntu", >>> >>> "export_path": "cassandra.tar" >>> >>> } >>> >>> ], >>> >>> "provisioners": [ >>> >>> { >>> >>> "type": "salt-masterless", >>> >>> "local_state_tree": "/home/ubuntu/saltstack", >>> >>> "custom_state": "/home/ubuntu/saltstack/cassandra", >>> >>> "disable_sudo": true >>> >>> } >>> >>> ] >>> >>> } >>> >>> I just want to build a docker image using salt state files that are >>> located in "/home/ubuntu/saltstack/cassandra". >>> >>> When I run packer build packer.json. I get the following putput >>> >>> *docker output will be in this color.* >>> >>> >>> *==> docker: Creating a temporary directory for sharing data...* >>> >>> *==> docker: Pulling Docker image: enonic/docker-salt-masterless-ubuntu* >>> >>> docker: Using default tag: latest >>> >>> docker: latest: Pulling from enonic/docker-salt-masterless-ubuntu >>> >>> docker: a3ed95caeb02: Already exists >>> >>> docker: 831a6feb5ab2: Already exists >>> >>> docker: 9a80cf3dc0d4: Already exists >>> >>> docker: 0b7e0d746c2a: Already exists >>> >>> docker: caa529e47699: Already exists >>> >>> docker: cc3d786e1a1d: Already exists >>> >>> docker: a3ed95caeb02: Already exists >>> >>> docker: a3ed95caeb02: Already exists >>> >>> docker: 542bb8386cb7: Already exists >>> >>> docker: 85d9f5a7e4c4: Already exists >>> >>> docker: 8d957d809ea4: Already exists >>> >>> docker: 0b3aea992171: Already exists >>> >>> docker: 55d33ae09bd1: Already exists >>> >>> docker: 783a588e9033: Already exists >>> >>> docker: f5baec465fa6: Already exists >>> >>> docker: be1db5170aaa: Already exists >>> >>> docker: a3ed95caeb02: Already exists >>> >>> docker: a3ed95caeb02: Already exists >>> >>> docker: Digest: sha256:5a89f581b9e4360eebf3133 >>> c6611b68ca359d69f80edca3f0a7c091e859377c2 >>> >>> docker: Status: Image is up to date for >>> enonic/docker-salt-masterless-ubuntu:latest >>> >>> *==> docker: Starting docker container...* >>> >>> docker: Run command: docker run -v /home/ubuntu/.packer.d/tmp/pac >>> ker-docker794493932:/packer-files -d -i -t >>> enonic/docker-salt-masterless-ubuntu /bin/bash >>> >>> docker: Container ID: cd0129f12041cf56cca6611b385486 >>> 44a44b7faac86b6a22572a995aec14b463 >>> >>> *==> docker: Provisioning with Salt...* >>> >>> docker: Downloading saltstack bootstrap to /tmp/install_salt.sh >>> >>> docker: /bin/sh: 1: curl: not found >>> >>> docker: /bin/sh: 1: wget: not found >>> >>> docker: Installing Salt with command sh /tmp/install_salt.sh >>> >>> docker: sh: 0: Can't open /tmp/install_salt.sh >>> >>> docker: Creating remote temporary directory: /tmp/salt >>> >>> docker: Creating directory: /tmp/salt >>> >>> docker: Uploading local state tree: /home/ubuntu/saltstack >>> >>> docker: Creating directory: /tmp/salt/states >>> >>> docker: Removing directory: /srv/salt >>> >>> docker: Moving /tmp/salt/states to /srv/salt >>> >>> docker: Running: salt-call --local state.sls >>> /home/ubuntu/saltstack/cassandra --file-root=/srv/salt >>> --pillar-root=/srv/pillar --retcode-passthrough -l info >>> >>> docker: [INFO ] Found minion id from getfqdn(): cd0129f12041 >>> >>> docker: [WARNING ] Although 'dmidecode' was found in path, the >>> current user cannot execute it. Grains output might not be accurate. >>> >>> docker: [WARNING ] Although 'dmidecode' was found in path, the >>> current user cannot execute it. Grains output might not be accurate. >>> >>> docker: [INFO ] Loading fresh modules for state activity >>> >>> docker: local: >>> >>> docker: Data failed to compile: >>> >>> docker: ---------- >>> >>> docker: No matching sls found for '/home/ubuntu/saltstack/cassandra' >>> in env 'base' >>> >>> *==> docker: Killing the container: >>> cd0129f12041cf56cca6611b38548644a44b7faac86b6a22572a995aec14b463* >>> >>> *Build 'docker' errored: Error executing salt-call: Bad exit status: 1* >>> >>> >>> *Thanks!* >>> >>> On Sunday, September 17, 2017 at 11:54:25 PM UTC-7, Alvaro Miranda >>> Aguilera wrote: >>>> >>>> Hello >>>> >>>> you can build one once you get all the steps. >>>> >>>> moving one step at the time, do you need any help for the packer + >>>> docker part ? >>>> >>>> On Sun, Sep 17, 2017 at 7:22 AM, kant kodali <kant...@gmail.com> wrote: >>>> >>>>> Hi All, >>>>> >>>>> Is there an example on how to build docker image using salt >>>>> provisioner for cassandra using standard salt cassandra formula >>>>> <https://github.com/salt-formulas/salt-formula-cassandra>? I don't >>>>> see any examples online of anything similar on how to do this. >>>>> >>>>> Thanks! >>>>> >>>>> >>>>> >>>>> -- >>>>> This mailing list is governed under the HashiCorp Community Guidelines >>>>> - https://www.hashicorp.com/community-guidelines.html. Behavior in >>>>> violation of those guidelines may result in your removal from this mailing >>>>> list. >>>>> >>>>> GitHub Issues: https://github.com/mitchellh/packer/issues >>>>> IRC: #packer-tool on Freenode >>>>> --- >>>>> You received this message because you are subscribed to the Google >>>>> Groups "Packer" group. >>>>> To unsubscribe from this group and stop receiving emails from it, send >>>>> an email to packer-tool...@googlegroups.com. >>>>> To view this discussion on the web visit >>>>> https://groups.google.com/d/msgid/packer-tool/513ef6b1-7005- >>>>> 4bcd-bb60-2cfe4383567a%40googlegroups.com >>>>> <https://groups.google.com/d/msgid/packer-tool/513ef6b1-7005-4bcd-bb60-2cfe4383567a%40googlegroups.com?utm_medium=email&utm_source=footer> >>>>> . >>>>> For more options, visit https://groups.google.com/d/optout. >>>>> >>>> >>>> >>>> >>>> -- >>>> Alvaro >>>> >>>> -- >> This mailing list is governed under the HashiCorp Community Guidelines - >> https://www.hashicorp.com/community-guidelines.html. Behavior in >> violation of those guidelines may result in your removal from this mailing >> list. >> >> GitHub Issues: https://github.com/mitchellh/packer/issues >> IRC: #packer-tool on Freenode >> --- >> You received this message because you are subscribed to the Google Groups >> "Packer" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to packer-tool+unsubscr...@googlegroups.com. >> To view this discussion on the web visit https://groups.google.com/d/ms >> gid/packer-tool/73768f51-4cf9-4c08-9c60-8b2d186c0440%40googlegroups.com >> <https://groups.google.com/d/msgid/packer-tool/73768f51-4cf9-4c08-9c60-8b2d186c0440%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > Alvaro > > -- > This mailing list is governed under the HashiCorp Community Guidelines - > https://www.hashicorp.com/community-guidelines.html. Behavior in > violation of those guidelines may result in your removal from this mailing > list. > > GitHub Issues: https://github.com/mitchellh/packer/issues > IRC: #packer-tool on Freenode > --- > You received this message because you are subscribed to a topic in the > Google Groups "Packer" group. > To unsubscribe from this topic, visit https://groups.google.com/d/ > topic/packer-tool/rtKGUPB6Cyk/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > packer-tool+unsubscr...@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/packer-tool/CAHqq0eyjEbcm2pONmp2rO0WDUzB%3DjNVxaKnrLc2NgpERxuz9rQ% > 40mail.gmail.com > <https://groups.google.com/d/msgid/packer-tool/CAHqq0eyjEbcm2pONmp2rO0WDUzB%3DjNVxaKnrLc2NgpERxuz9rQ%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list. GitHub Issues: https://github.com/mitchellh/packer/issues IRC: #packer-tool on Freenode --- You received this message because you are subscribed to the Google Groups "Packer" group. To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/CA%2BiiNx8%2BVnE0rhwksc1%2BDs7g8%2BeweHbt4cFydJrW_Va6wsqB9Q%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.