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:5a89f581b9e4360eebf3133c6611b68ca359d69f80edca3f0a7c091e859377c2

    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/packer-docker794493932:/packer-files -d -i -t 
enonic/docker-salt-masterless-ubuntu /bin/bash

    docker: Container ID: 
cd0129f12041cf56cca6611b38548644a44b7faac86b6a22572a995aec14b463

*==> 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 
> <javascript:>> 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 <javascript:>.
>> 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/msgid/packer-tool/4a1efeaf-a2bf-4e3c-b0a0-2e14c9364fba%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to