Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions stemcell_builder/lib/prelude_agent.bash

This file was deleted.

30 changes: 2 additions & 28 deletions stemcell_builder/stages/bosh_alicloud_agent_settings/apply.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,6 @@

base_dir=$(readlink -nf $(dirname $0)/../..)
source $base_dir/lib/prelude_apply.bash
source $base_dir/lib/prelude_agent.bash

cat > $chroot/var/vcap/bosh/agent.json <<JSON
{
"Platform": {
"Linux": {
$(get_partitioner_type_mapping)
"CreatePartitionIfNoEphemeralDisk": true,
"DevicePathResolutionType": "virtio",
"UseMonitIptablesFirewall": true
}
},
"Infrastructure": {
"Settings": {
"Sources": [
{
"Type": "HTTP",
"URI": "http://100.100.100.200",
"UserDataPath": "/latest/user-data",
"InstanceIDPath": "/latest/meta-data/instance-id",
"SSHKeysPath": "/latest/meta-data/public-keys/0/openssh-key"
}
],
"UseServerName": false,
"UseRegistry": true
}
}
}
JSON
# shellcheck disable=SC2154
cp "$assets_dir/agent.json" "$chroot/var/vcap/bosh/agent.json"
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"Platform": {
"Linux": {
"PartitionerType": "parted",
"CreatePartitionIfNoEphemeralDisk": true,
"DevicePathResolutionType": "virtio",
"UseMonitIptablesFirewall": true
}
},
"Infrastructure": {
"Settings": {
"Sources": [
{
"Type": "HTTP",
"URI": "http://100.100.100.200",
"UserDataPath": "/latest/user-data",
"InstanceIDPath": "/latest/meta-data/instance-id",
"SSHKeysPath": "/latest/meta-data/public-keys/0/openssh-key"
}
],
"UseServerName": false,
"UseRegistry": true
}
}
}
32 changes: 2 additions & 30 deletions stemcell_builder/stages/bosh_aws_agent_settings/apply.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,6 @@

base_dir=$(readlink -nf $(dirname $0)/../..)
source $base_dir/lib/prelude_apply.bash
source $base_dir/lib/prelude_agent.bash

cat > $chroot/var/vcap/bosh/agent.json <<JSON
{
"Platform": {
"Linux": {
$(get_partitioner_type_mapping)
"DevicePathResolutionType": "virtio",
"CreatePartitionIfNoEphemeralDisk": true,
"UseMonitIptablesFirewall": true,
"InstanceStorageDevicePattern": "/dev/nvme*n1",
"InstanceStorageManagedVolumePattern": "/dev/disk/by-id/nvme-Amazon_Elastic_Block_Store_*"
}
},
"Infrastructure": {
"Settings": {
"Sources": [
{
"Type": "HTTP",
"URI": "http://169.254.169.254",
"UserDataPath": "/latest/user-data",
"InstanceIDPath": "/latest/meta-data/instance-id",
"SSHKeysPath": "/latest/meta-data/public-keys/0/openssh-key",
"TokenPath": "/latest/api/token"
}
],
"UseRegistry": true
}
}
}
JSON
# shellcheck disable=SC2154
cp "$assets_dir/agent.json" "$chroot/var/vcap/bosh/agent.json"
27 changes: 27 additions & 0 deletions stemcell_builder/stages/bosh_aws_agent_settings/assets/agent.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"Platform": {
"Linux": {
"PartitionerType": "parted",
"DevicePathResolutionType": "virtio",
"CreatePartitionIfNoEphemeralDisk": true,
"UseMonitIptablesFirewall": true,
"InstanceStorageDevicePattern": "/dev/nvme*n1",
"InstanceStorageManagedVolumePattern": "/dev/disk/by-id/nvme-Amazon_Elastic_Block_Store_*"
}
},
"Infrastructure": {
"Settings": {
"Sources": [
{
"Type": "HTTP",
"URI": "http://169.254.169.254",
"UserDataPath": "/latest/user-data",
"InstanceIDPath": "/latest/meta-data/instance-id",
"SSHKeysPath": "/latest/meta-data/public-keys/0/openssh-key",
"TokenPath": "/latest/api/token"
}
],
"UseRegistry": true
}
}
}
28 changes: 2 additions & 26 deletions stemcell_builder/stages/bosh_azure_agent_settings/apply.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,5 @@
base_dir=$(readlink -nf $(dirname $0)/../..)
source $base_dir/lib/prelude_apply.bash

# Set SettingsPath but never use it because file_meta_service is avaliable only when the settings file exists.
cat > $chroot/var/vcap/bosh/agent.json <<JSON
{
"Platform": {
"Linux": {
"CreatePartitionIfNoEphemeralDisk": true,
"DevicePathResolutionType": "scsi",
"PartitionerType": "parted",
"UseMonitIptablesFirewall": true
}
},
"Infrastructure": {
"Settings": {
"Sources": [
{
"Type": "File",
"MetaDataPath": "",
"UserDataPath": "/var/lib/cloud/instance/user-data.txt",
"SettingsPath": "/var/lib/cloud/instance/user-data.txt"
}
],
"UseServerName": true
}
}
}
JSON
# shellcheck disable=SC2154
cp "$assets_dir/agent.json" "$chroot/var/vcap/bosh/agent.json"
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"Platform": {
"Linux": {
"CreatePartitionIfNoEphemeralDisk": true,
"DevicePathResolutionType": "scsi",
"PartitionerType": "parted",
"UseMonitIptablesFirewall": true
}
},
"Infrastructure": {
"Settings": {
"Sources": [
{
"Type": "File",
"MetaDataPath": "",
"UserDataPath": "/var/lib/cloud/instance/user-data.txt",
"SettingsPath": "/var/lib/cloud/instance/user-data.txt"
}
],
"UseServerName": true
}
}
}
32 changes: 2 additions & 30 deletions stemcell_builder/stages/bosh_cloudstack_agent_settings/apply.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,6 @@

base_dir=$(readlink -nf $(dirname $0)/../..)
source $base_dir/lib/prelude_apply.bash
source $base_dir/lib/prelude_agent.bash

agent_settings_file=$chroot/var/vcap/bosh/agent.json

cat > $agent_settings_file <<JSON
{
"Platform": {
"Linux": {
$(get_partitioner_type_mapping)
"CreatePartitionIfNoEphemeralDisk": true,
"DevicePathResolutionType": "virtio",
"UseMonitIptablesFirewall": true
}
},
"Infrastructure": {
"Settings": {
"Sources": [
{
"Type": "HTTP",
"URI": "http://169.254.169.254:39724",
"UserDataPath": "/latest/user-data",
"InstanceIDPath": "/latest/meta-data/instance-id",
"SSHKeysPath": "/latest/meta-data/public-keys"
}
],
"UseServerName": true,
"UseRegistry": true
}
}
}
JSON
# shellcheck disable=SC2154
cp "$assets_dir/agent.json" "$chroot/var/vcap/bosh/agent.json"
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"Platform": {
"Linux": {
"PartitionerType": "parted",
"CreatePartitionIfNoEphemeralDisk": true,
"DevicePathResolutionType": "virtio",
"UseMonitIptablesFirewall": true
}
},
"Infrastructure": {
"Settings": {
"Sources": [
{
"Type": "HTTP",
"URI": "http://169.254.169.254:39724",
"UserDataPath": "/latest/user-data",
"InstanceIDPath": "/latest/meta-data/instance-id",
"SSHKeysPath": "/latest/meta-data/public-keys"
}
],
"UseServerName": true,
"UseRegistry": true
}
}
}
33 changes: 2 additions & 31 deletions stemcell_builder/stages/bosh_google_agent_settings/apply.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,6 @@

base_dir=$(readlink -nf $(dirname $0)/../..)
source $base_dir/lib/prelude_apply.bash
source $base_dir/lib/prelude_agent.bash

cat > $chroot/var/vcap/bosh/agent.json <<JSON
{
"Platform": {
"Linux": {
"CreatePartitionIfNoEphemeralDisk": true,
$(get_partitioner_type_mapping)
"DevicePathResolutionType": "virtio",
"VirtioDevicePrefix": "google",
"UseMonitIptablesFirewall": true
}
},
"Infrastructure": {
"Settings": {
"Sources": [
{
"Type": "InstanceMetadata",
"URI": "http://169.254.169.254",
"SettingsPath": "/computeMetadata/v1/instance/attributes/bosh_settings",
"Headers": {
"Metadata-Flavor": "Google"
}
}
],

"UseServerName": true,
"UseRegistry": false
}
}
}
JSON
# shellcheck disable=SC2154
cp "$assets_dir/agent.json" "$chroot/var/vcap/bosh/agent.json"
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"Platform": {
"Linux": {
"CreatePartitionIfNoEphemeralDisk": true,
"PartitionerType": "parted",
"DevicePathResolutionType": "virtio",
"VirtioDevicePrefix": "google",
"UseMonitIptablesFirewall": true
}
},
"Infrastructure": {
"Settings": {
"Sources": [
{
"Type": "InstanceMetadata",
"URI": "http://169.254.169.254",
"SettingsPath": "/computeMetadata/v1/instance/attributes/bosh_settings",
"Headers": {
"Metadata-Flavor": "Google"
}
}
],
"UseServerName": true,
"UseRegistry": false
}
}
}
46 changes: 2 additions & 44 deletions stemcell_builder/stages/bosh_openstack_agent_settings/apply.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,48 +2,6 @@

base_dir=$(readlink -nf $(dirname $0)/../..)
source $base_dir/lib/prelude_apply.bash
source $base_dir/lib/prelude_agent.bash

agent_settings_file=$chroot/var/vcap/bosh/agent.json

cat > $agent_settings_file <<JSON
{
"Platform": {
"Linux": {
$(get_partitioner_type_mapping)
"CreatePartitionIfNoEphemeralDisk": true,
"DevicePathResolutionType": "virtio",
"UseMonitIptablesFirewall": true
}
},
"Infrastructure": {
"Settings": {
"Sources": [
{
"Type": "File",
"SettingsPath": "/var/vcap/bosh/agent-bootstrap-env.json"
},
{
"Type": "ConfigDrive",
"DiskPaths": [
"/dev/disk/by-label/CONFIG-2",
"/dev/disk/by-label/config-2"
],
"MetaDataPath": "ec2/latest/meta-data.json",
"UserDataPath": "ec2/latest/user-data"
},
{
"Type": "HTTP",
"URI": "http://169.254.169.254",
"UserDataPath": "/latest/user-data",
"InstanceIDPath": "/latest/meta-data/instance-id",
"SSHKeysPath": "/latest/meta-data/public-keys/0/openssh-key"
}
],

"UseServerName": true,
"UseRegistry": true
}
}
}
JSON
# shellcheck disable=SC2154
cp "$assets_dir/agent.json" "$chroot/var/vcap/bosh/agent.json"
Loading
Loading