--
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+unsubscribe@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.
For more options, visit https://groups.google.com/d/optout.
{
"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
}
]
}
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!
Helloyou 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? 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.
For more options, visit https://groups.google.com/d/optout.
--Alvaro
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/73768f51-4cf9-4c08-9c60-8b2d186c0440%40googlegroups.com.To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool+unsubscribe@googlegroups.com.
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/CAHqq0eyjEbcm2pONmp2rO0WDUzB%3DjNVxaKnrLc2NgpERxuz9rQ%40mail.gmail.com.
{
"builders": [
{
"type": "docker",
"image": "enonic/docker-salt-masterless-ubuntu",
"export_path": "cassandra.tar"
}
],
"provisioners": [
{
"type": "file",
"source": "/srv/salt/cassandra", // I moved cassandra directory to this location in host
"destination": "/srv/salt/cassandra" // I was expecting this is the location inside container it will get copied too but didn't work
},
{
"type": "salt-masterless",
"local_state_tree": "/srv/salt/cassandra",
"custom_state": "/srv/salt/cassandra/init.sls",
"disable_sudo": true
}
]
}
sudo packer build packer.json
Build 'docker' errored: Failed to upload to '/srv/salt/cassandra' in container: Error response from daemon: lstat /var/lib/docker/aufs/mnt/0c6a422400a073624a66b00580a6b9e5551e82a06495c46b1f840b38ca55699d/srv/salt: no such file or directory
. exit status 1.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/CA%2BiiNx-0FG_Ac29Whfx0FROTSEnNnONVGtzRJby%2BK0wtM3Rf7A%40mail.gmail.com.
{
"builders": [
{
"type": "docker",
"image": "enonic/docker-salt-masterless-ubuntu",
"export_path": "cassandra.tar"
}
],
"provisioners": [
{
"type": "salt-masterless",
"local_state_tree": "/srv/salt",
"custom_state": "cassandra-local",
"skip_bootstrap": true,
"disable_sudo": true
}
]
}
==> docker: Exporting the container
==> docker: Killing the container: b33b07f7f0ecf5026574d29ee28aed0f71659ae11955994ac27fca060c7e7c22
Build 'docker' finished.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/CALz9Rt-vmv1Vc%2BY_ZXsORDWG2nJURXGxESMirWmj6MygGo-8nA%40mail.gmail.com.
I thought when I run packer build packer.json it would build a docker image which I can use to spawn a container.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/CA%2BiiNx-JsBJaQgqpYy%2Br1DwxJsnctoGB4i%2BkkdRxei2W6xGZFQ%40mail.gmail.com.
{
"builders": [
{
"type": "docker",
"image": "enonic/docker-salt-masterless-ubuntu",
"commit": "true"
}
],
"provisioners": [
{
"type": "salt-masterless",
"local_state_tree": "/srv/salt",
"custom_state": "cassandra-local",
"skip_bootstrap": true,
"disable_sudo": true
}
],
"post-processors": [
[
{
"type": "docker-tag",
"repository": "hello/cassandra-demo",
"tag": "0.1"
}
]
]
}
docker run -it hello/cassandra-demo:0.1 bash
root@696a0fde2469:/# cqlsh
Connection error: ('Unable to connect to any servers', {'127.0.0.1': error(111, "Tried connecting to [('127.0.0.1', 9042)]. Last error: Connection refused")})
So what is that I need to start cassandra on a startup?
Thanks!
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/CALz9Rt-nC0oNgO7bKL3CfQM_G5xT5vdtWMtcJXJSoutoyhcs%2Bw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/CA%2BiiNx_jzmEhTfeU7FwrMYP_BZcXQJojxxfSMwy%2BWGnxu%2BFvUA%40mail.gmail.com.