Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
orlikoski committed Mar 27, 2019
1 parent a747abd commit ab7f28c
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 52 deletions.
14 changes: 1 addition & 13 deletions Packer/skadi_build/create_basebox.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,29 +101,17 @@
],
"provisioners": [
{
"environment_vars": [
"DEBIAN_FRONTEND=noninteractive",
"SSH_USERNAME=skadi",
"CDQR_VERSION=4.4.0",
"DEFAULT_PASSWORDS=true",
"INSTALL_BRANCH=esxi_packer",
"SKADI_HOSTNAME=true",
"MAKE_SKADI_USER=true",
"UTC_TIME=true"
],
"execute_command": "echo '{{ user `ssh_password` }}' | {{.Vars}} sudo -E -S bash '{{.Path}}'",
"scripts": [
"../script/update.sh",
"../script/skadi.sh",
"../script/motd.sh",
"{{user `custom_script` }}"
"../script/motd.sh"
],
"type": "shell",
"expect_disconnect": "true"
}
],
"variables": {
"custom_script": "../../scripts/signedbuildskadi.sh",
"skadi_default_passwords": "true",
"xenial_boot_command_prefix": "<enter><wait><f6><esc><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"bionic_boot_command_prefix": "<enter><wait><f6><esc><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
Expand Down
14 changes: 11 additions & 3 deletions Packer/skadi_build/create_boxes.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"provisioners": [
{
"environment_vars": [
"DEBIAN_FRONTEND=noninteractive",
"DEBIAN_FRONTEND=noninteractive"
],
"execute_command": "echo '{{ user `ssh_password` }}' | {{.Vars}} sudo -E -S bash '{{.Path}}'",
"scripts": [
Expand All @@ -33,7 +33,7 @@
},
{
"environment_vars": [
"DEBIAN_FRONTEND=noninteractive",
"DEBIAN_FRONTEND=noninteractive"
],
"execute_command": "echo '{{ user `ssh_password` }}' | {{.Vars}} sudo -E -S bash '{{.Path}}'",
"scripts": [
Expand All @@ -45,13 +45,20 @@
},
{
"environment_vars": [
"DEBIAN_FRONTEND=noninteractive",
"SSH_USERNAME=skadi",
"CDQR_VERSION=4.4.0",
"DEFAULT_PASSWORDS=true",
"INSTALL_BRANCH=esxi_packer",
"SKADI_HOSTNAME=true",
"MAKE_SKADI_USER=true",
"UTC_TIME=true"
],
"execute_command": "echo '{{ user `ssh_password` }}' | {{.Vars}} sudo -E -S bash '{{.Path}}'",
"scripts": [
"../script/vagrant.sh",
"../script/sshd.sh",
"../script/motd.sh",
"{{user `custom_script` }}",
"../script/cleanup.sh"
],
"type": "shell",
Expand All @@ -75,6 +82,7 @@
}
],
"variables": {
"custom_script": "../../scripts/signedbuildskadi.sh",
"version": "2019.2",
"vm_name": "skadi_server",
"headless": "true"
Expand Down
37 changes: 3 additions & 34 deletions Packer/skadi_build/create_ova.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
{
"_comment": "Build with `packer build create_VMWare_box.json`",
"builders": [
{
"type": "vmware-vmx",
"source_path": "output-skadi_basebox-vmware-iso/skadi_basebox.vmx",
"ssh_username": "vagrant",
"ssh_password": "vagrant",
"shutdown_command": "sudo shutdown -P now",
"headless": "{{ user `headless` }}"
},
{
"type": "virtualbox-ovf",
"source_path": "output-skadi_basebox-virtualbox-iso/skadi_basebox.ovf",
Expand All @@ -30,44 +22,21 @@
"scripts": [
"../script/update.sh",
"../script/vagrant.sh",
"../script/vmware.sh",
"../script/virtualbox.sh",
"{{user `custom_script`}}",
"../script/sshd.sh",
"../script/motd.sh",
"../script/cleanup.sh"
],
"type": "shell",
"expect_disconnect": "true"
},
{
"execute_command": "echo '{{ user `ssh_password` }}' | {{.Vars}} sudo -E -S bash '{{.Path}}'",
"scripts": [
"../script/vmware.sh"
],
"type": "shell",
"expect_disconnect": "true",
"only": ["vmware-vmx"]
},
{
"execute_command": "echo '{{ user `ssh_password` }}' | {{.Vars}} sudo -E -S bash '{{.Path}}'",
"scripts": [
"../script/virtualbox.sh"
],
"type": "shell",
"expect_disconnect": "true",
"only": ["virtualbox-ovf"]
}
],
"post-processors": [
{
"keep_input_artifact": false,
"output": "box/{{.Provider}}/{{user `vm_name`}}-{{user `version`}}.box",
"type": "vagrant",
"vagrantfile_template": "../../Vagrant/skadi_server/vmware/Vagrantfile",
"only": ["vmware-vmx"]
},
{
"keep_input_artifact": false,
"output": "box/{{.Provider}}/{{user `vm_name`}}-{{user `version`}}.box",
"output": "OVA/{{user `vm_name`}}-{{user `version`}}.box",
"type": "vagrant",
"vagrantfile_template": "../../Vagrant/skadi_server/virtualbox/Vagrantfile",
"only": ["virtualbox-ovf"]
Expand Down
3 changes: 1 addition & 2 deletions scripts/signedbuildskadi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,7 @@ curl -XPUT 'localhost:9200/_template/number_of_replicas' \

echo "Importing Saved Objects to Kibana"
sleep 10
curl -o /tmp/kibana_6.x.json https://raw.githubusercontent.com/orlikoski/Skadi/master/objects/kibana_6.x_cli_import.json
curl -X POST "http://localhost:5601/api/saved_objects/_bulk_create" -H 'kbn-xsrf: true' -H 'Content-Type: application/json' --data-binary @/tmp/kibana_6.x_cli_import.json
curl -X POST "http://localhost:5601/api/saved_objects/_bulk_create" -H 'kbn-xsrf: true' -H 'Content-Type: application/json' --data-binary @/opt/Skadi/objects/kibana_6.x_cli_import.json

# The TimeSketch container needs to be running before continuing and this
# requires the other containers to be up and running too. This can take time
Expand Down

0 comments on commit ab7f28c

Please sign in to comment.