mirror of
https://github.com/OpenNebula/one.git
synced 2024-12-22 13:33:52 +03:00
* rename Packet to Equinix in provision * rename packet to equinix in fireedge files * Update fireedge.d in provision templates Co-authored-by: Sergio Betanzos <sbetanzos@opennebula.io>
This commit is contained in:
parent
77276366a8
commit
03d43d399c
114
install.sh
114
install.sh
@ -306,7 +306,7 @@ LIB_DIRS="$LIB_LOCATION/ruby \
|
|||||||
$LIB_LOCATION/oneprovision/lib/terraform/providers/templates/aws \
|
$LIB_LOCATION/oneprovision/lib/terraform/providers/templates/aws \
|
||||||
$LIB_LOCATION/oneprovision/lib/terraform/providers/templates/google \
|
$LIB_LOCATION/oneprovision/lib/terraform/providers/templates/google \
|
||||||
$LIB_LOCATION/oneprovision/lib/terraform/providers/templates/digitalocean \
|
$LIB_LOCATION/oneprovision/lib/terraform/providers/templates/digitalocean \
|
||||||
$LIB_LOCATION/oneprovision/lib/terraform/providers/templates/packet \
|
$LIB_LOCATION/oneprovision/lib/terraform/providers/templates/equinix \
|
||||||
$LIB_LOCATION/oneprovision/lib/terraform/providers/templates/vultr_metal \
|
$LIB_LOCATION/oneprovision/lib/terraform/providers/templates/vultr_metal \
|
||||||
$LIB_LOCATION/oneprovision/lib/terraform/providers/templates/vultr_virtual \
|
$LIB_LOCATION/oneprovision/lib/terraform/providers/templates/vultr_virtual \
|
||||||
$LIB_LOCATION/oneprovision/lib/provision \
|
$LIB_LOCATION/oneprovision/lib/provision \
|
||||||
@ -409,13 +409,13 @@ VAR_DIRS="$VAR_LOCATION/remotes \
|
|||||||
$VAR_LOCATION/remotes/im/one-probes.d/vm/monitor \
|
$VAR_LOCATION/remotes/im/one-probes.d/vm/monitor \
|
||||||
$VAR_LOCATION/remotes/im/one-probes.d/vm/status \
|
$VAR_LOCATION/remotes/im/one-probes.d/vm/status \
|
||||||
$VAR_LOCATION/remotes/im/one-probes.d/vm/snapshot \
|
$VAR_LOCATION/remotes/im/one-probes.d/vm/snapshot \
|
||||||
$VAR_LOCATION/remotes/im/packet.d \
|
$VAR_LOCATION/remotes/im/equinix.d \
|
||||||
$VAR_LOCATION/remotes/im/packet-probes.d/host/beacon \
|
$VAR_LOCATION/remotes/im/equinix-probes.d/host/beacon \
|
||||||
$VAR_LOCATION/remotes/im/packet-probes.d/host/monitor \
|
$VAR_LOCATION/remotes/im/equinix-probes.d/host/monitor \
|
||||||
$VAR_LOCATION/remotes/im/packet-probes.d/host/system \
|
$VAR_LOCATION/remotes/im/equinix-probes.d/host/system \
|
||||||
$VAR_LOCATION/remotes/im/packet-probes.d/vm/monitor \
|
$VAR_LOCATION/remotes/im/equinix-probes.d/vm/monitor \
|
||||||
$VAR_LOCATION/remotes/im/packet-probes.d/vm/status \
|
$VAR_LOCATION/remotes/im/equinix-probes.d/vm/status \
|
||||||
$VAR_LOCATION/remotes/im/packet-probes.d/vm/snapshot \
|
$VAR_LOCATION/remotes/im/equinix-probes.d/vm/snapshot \
|
||||||
$VAR_LOCATION/remotes/vmm \
|
$VAR_LOCATION/remotes/vmm \
|
||||||
$VAR_LOCATION/remotes/vmm/lib \
|
$VAR_LOCATION/remotes/vmm/lib \
|
||||||
$VAR_LOCATION/remotes/vmm/kvm \
|
$VAR_LOCATION/remotes/vmm/kvm \
|
||||||
@ -425,7 +425,7 @@ VAR_DIRS="$VAR_LOCATION/remotes \
|
|||||||
$VAR_LOCATION/remotes/vmm/one \
|
$VAR_LOCATION/remotes/vmm/one \
|
||||||
$VAR_LOCATION/remotes/vmm/lxd \
|
$VAR_LOCATION/remotes/vmm/lxd \
|
||||||
$VAR_LOCATION/remotes/vmm/lxc \
|
$VAR_LOCATION/remotes/vmm/lxc \
|
||||||
$VAR_LOCATION/remotes/vmm/packet \
|
$VAR_LOCATION/remotes/vmm/equinix \
|
||||||
$VAR_LOCATION/remotes/vmm/firecracker \
|
$VAR_LOCATION/remotes/vmm/firecracker \
|
||||||
$VAR_LOCATION/remotes/vnm \
|
$VAR_LOCATION/remotes/vnm \
|
||||||
$VAR_LOCATION/remotes/vnm/802.1Q \
|
$VAR_LOCATION/remotes/vnm/802.1Q \
|
||||||
@ -511,7 +511,7 @@ VAR_DIRS="$VAR_LOCATION/remotes \
|
|||||||
$VAR_LOCATION/remotes/auth/server_cipher \
|
$VAR_LOCATION/remotes/auth/server_cipher \
|
||||||
$VAR_LOCATION/remotes/auth/dummy \
|
$VAR_LOCATION/remotes/auth/dummy \
|
||||||
$VAR_LOCATION/remotes/ipam/dummy \
|
$VAR_LOCATION/remotes/ipam/dummy \
|
||||||
$VAR_LOCATION/remotes/ipam/packet \
|
$VAR_LOCATION/remotes/ipam/equinix \
|
||||||
$VAR_LOCATION/remotes/ipam/vultr \
|
$VAR_LOCATION/remotes/ipam/vultr \
|
||||||
$VAR_LOCATION/remotes/ipam/aws"
|
$VAR_LOCATION/remotes/ipam/aws"
|
||||||
|
|
||||||
@ -602,7 +602,7 @@ INSTALL_FILES=(
|
|||||||
IM_PROBES_EC2_FILES:$VAR_LOCATION/remotes/im/ec2.d
|
IM_PROBES_EC2_FILES:$VAR_LOCATION/remotes/im/ec2.d
|
||||||
IM_PROBES_AZ_FILES:$VAR_LOCATION/remotes/im/az.d
|
IM_PROBES_AZ_FILES:$VAR_LOCATION/remotes/im/az.d
|
||||||
IM_PROBES_ONE_FILES:$VAR_LOCATION/remotes/im/one.d
|
IM_PROBES_ONE_FILES:$VAR_LOCATION/remotes/im/one.d
|
||||||
IM_PROBES_PACKET_FILES:$VAR_LOCATION/remotes/im/packet.d
|
IM_PROBES_EQUINIX_FILES:$VAR_LOCATION/remotes/im/equinix.d
|
||||||
IM_PROBES_KVM_HOST_BEACON_FILES:$VAR_LOCATION/remotes/im/kvm-probes.d/host/beacon
|
IM_PROBES_KVM_HOST_BEACON_FILES:$VAR_LOCATION/remotes/im/kvm-probes.d/host/beacon
|
||||||
IM_PROBES_KVM_HOST_MONITOR_FILES:$VAR_LOCATION/remotes/im/kvm-probes.d/host/monitor
|
IM_PROBES_KVM_HOST_MONITOR_FILES:$VAR_LOCATION/remotes/im/kvm-probes.d/host/monitor
|
||||||
IM_PROBES_KVM_HOST_SYSTEM_FILES:$VAR_LOCATION/remotes/im/kvm-probes.d/host/system
|
IM_PROBES_KVM_HOST_SYSTEM_FILES:$VAR_LOCATION/remotes/im/kvm-probes.d/host/system
|
||||||
@ -651,11 +651,11 @@ INSTALL_FILES=(
|
|||||||
IM_PROBES_ONE_HOST_SYSTEM_FILES:$VAR_LOCATION/remotes/im/one-probes.d/host/system
|
IM_PROBES_ONE_HOST_SYSTEM_FILES:$VAR_LOCATION/remotes/im/one-probes.d/host/system
|
||||||
IM_PROBES_ONE_VM_MONITOR_FILES:$VAR_LOCATION/remotes/im/one-probes.d/vm/monitor
|
IM_PROBES_ONE_VM_MONITOR_FILES:$VAR_LOCATION/remotes/im/one-probes.d/vm/monitor
|
||||||
IM_PROBES_ONE_VM_STATUS_FILES:$VAR_LOCATION/remotes/im/one-probes.d/vm/status
|
IM_PROBES_ONE_VM_STATUS_FILES:$VAR_LOCATION/remotes/im/one-probes.d/vm/status
|
||||||
IM_PROBES_PACKET_HOST_BEACON_FILES:$VAR_LOCATION/remotes/im/packet-probes.d/host/beacon
|
IM_PROBES_EQUINIX_HOST_BEACON_FILES:$VAR_LOCATION/remotes/im/equinix-probes.d/host/beacon
|
||||||
IM_PROBES_PACKET_HOST_MONITOR_FILES:$VAR_LOCATION/remotes/im/packet-probes.d/host/monitor
|
IM_PROBES_EQUINIX_HOST_MONITOR_FILES:$VAR_LOCATION/remotes/im/equinix-probes.d/host/monitor
|
||||||
IM_PROBES_PACKET_HOST_SYSTEM_FILES:$VAR_LOCATION/remotes/im/packet-probes.d/host/system
|
IM_PROBES_EQUINIX_HOST_SYSTEM_FILES:$VAR_LOCATION/remotes/im/equinix-probes.d/host/system
|
||||||
IM_PROBES_PACKET_VM_MONITOR_FILES:$VAR_LOCATION/remotes/im/packet-probes.d/vm/monitor
|
IM_PROBES_EQUINIX_VM_MONITOR_FILES:$VAR_LOCATION/remotes/im/equinix-probes.d/vm/monitor
|
||||||
IM_PROBES_PACKET_VM_STATUS_FILES:$VAR_LOCATION/remotes/im/packet-probes.d/vm/status
|
IM_PROBES_EQUINIX_VM_STATUS_FILES:$VAR_LOCATION/remotes/im/equinix-probes.d/vm/status
|
||||||
IM_PROBES_VERSION:$VAR_LOCATION/remotes
|
IM_PROBES_VERSION:$VAR_LOCATION/remotes
|
||||||
IM_PROBES_FIRECRACKER_HOST_BEACON_FILES:$VAR_LOCATION/remotes/im/firecracker-probes.d/host/beacon
|
IM_PROBES_FIRECRACKER_HOST_BEACON_FILES:$VAR_LOCATION/remotes/im/firecracker-probes.d/host/beacon
|
||||||
IM_PROBES_FIRECRACKER_HOST_MONITOR_FILES:$VAR_LOCATION/remotes/im/firecracker-probes.d/host/monitor
|
IM_PROBES_FIRECRACKER_HOST_MONITOR_FILES:$VAR_LOCATION/remotes/im/firecracker-probes.d/host/monitor
|
||||||
@ -690,7 +690,7 @@ INSTALL_FILES=(
|
|||||||
VMM_EXEC_EC2_SCRIPTS:$VAR_LOCATION/remotes/vmm/ec2
|
VMM_EXEC_EC2_SCRIPTS:$VAR_LOCATION/remotes/vmm/ec2
|
||||||
VMM_EXEC_AZ_SCRIPTS:$VAR_LOCATION/remotes/vmm/az
|
VMM_EXEC_AZ_SCRIPTS:$VAR_LOCATION/remotes/vmm/az
|
||||||
VMM_EXEC_ONE_SCRIPTS:$VAR_LOCATION/remotes/vmm/one
|
VMM_EXEC_ONE_SCRIPTS:$VAR_LOCATION/remotes/vmm/one
|
||||||
VMM_EXEC_PACKET_SCRIPTS:$VAR_LOCATION/remotes/vmm/packet
|
VMM_EXEC_EQUINIX_SCRIPTS:$VAR_LOCATION/remotes/vmm/equinix
|
||||||
TM_FILES:$VAR_LOCATION/remotes/tm
|
TM_FILES:$VAR_LOCATION/remotes/tm
|
||||||
TM_SHARED_FILES:$VAR_LOCATION/remotes/tm/shared
|
TM_SHARED_FILES:$VAR_LOCATION/remotes/tm/shared
|
||||||
TM_FS_LVM_FILES:$VAR_LOCATION/remotes/tm/fs_lvm
|
TM_FS_LVM_FILES:$VAR_LOCATION/remotes/tm/fs_lvm
|
||||||
@ -724,7 +724,7 @@ INSTALL_FILES=(
|
|||||||
MARKETPLACE_DRIVER_DH_SCRIPTS:$VAR_LOCATION/remotes/market/dockerhub
|
MARKETPLACE_DRIVER_DH_SCRIPTS:$VAR_LOCATION/remotes/market/dockerhub
|
||||||
MARKETPLACE_DRIVER_REGISTRY_SCRIPTS:$VAR_LOCATION/remotes/market/docker_registry
|
MARKETPLACE_DRIVER_REGISTRY_SCRIPTS:$VAR_LOCATION/remotes/market/docker_registry
|
||||||
IPAM_DRIVER_DUMMY_SCRIPTS:$VAR_LOCATION/remotes/ipam/dummy
|
IPAM_DRIVER_DUMMY_SCRIPTS:$VAR_LOCATION/remotes/ipam/dummy
|
||||||
IPAM_DRIVER_PACKET_SCRIPTS:$VAR_LOCATION/remotes/ipam/packet
|
IPAM_DRIVER_EQUINIX_SCRIPTS:$VAR_LOCATION/remotes/ipam/equinix
|
||||||
IPAM_DRIVER_VULTR_SCRIPTS:$VAR_LOCATION/remotes/ipam/vultr
|
IPAM_DRIVER_VULTR_SCRIPTS:$VAR_LOCATION/remotes/ipam/vultr
|
||||||
IPAM_DRIVER_EC2_SCRIPTS:$VAR_LOCATION/remotes/ipam/aws
|
IPAM_DRIVER_EC2_SCRIPTS:$VAR_LOCATION/remotes/ipam/aws
|
||||||
NETWORK_FILES:$VAR_LOCATION/remotes/vnm
|
NETWORK_FILES:$VAR_LOCATION/remotes/vnm
|
||||||
@ -802,7 +802,7 @@ INSTALL_ONEPROVISION_FILES=(
|
|||||||
ONEPROVISION_LIB_AWS_ERB_FILES:$LIB_LOCATION/oneprovision/lib/terraform/providers/templates/aws
|
ONEPROVISION_LIB_AWS_ERB_FILES:$LIB_LOCATION/oneprovision/lib/terraform/providers/templates/aws
|
||||||
ONEPROVISION_LIB_GOOGLE_ERB_FILES:$LIB_LOCATION/oneprovision/lib/terraform/providers/templates/google
|
ONEPROVISION_LIB_GOOGLE_ERB_FILES:$LIB_LOCATION/oneprovision/lib/terraform/providers/templates/google
|
||||||
ONEPROVISION_LIB_DIGITALOCEAN_ERB_FILES:$LIB_LOCATION/oneprovision/lib/terraform/providers/templates/digitalocean
|
ONEPROVISION_LIB_DIGITALOCEAN_ERB_FILES:$LIB_LOCATION/oneprovision/lib/terraform/providers/templates/digitalocean
|
||||||
ONEPROVISION_LIB_PACKET_ERB_FILES:$LIB_LOCATION/oneprovision/lib/terraform/providers/templates/packet
|
ONEPROVISION_LIB_EQUINIX_ERB_FILES:$LIB_LOCATION/oneprovision/lib/terraform/providers/templates/equinix
|
||||||
ONEPROVISION_LIB_VULTR_METAL_ERB_FILES:$LIB_LOCATION/oneprovision/lib/terraform/providers/templates/vultr_metal
|
ONEPROVISION_LIB_VULTR_METAL_ERB_FILES:$LIB_LOCATION/oneprovision/lib/terraform/providers/templates/vultr_metal
|
||||||
ONEPROVISION_LIB_VULTR_VIRTUAL_ERB_FILES:$LIB_LOCATION/oneprovision/lib/terraform/providers/templates/vultr_virtual
|
ONEPROVISION_LIB_VULTR_VIRTUAL_ERB_FILES:$LIB_LOCATION/oneprovision/lib/terraform/providers/templates/vultr_virtual
|
||||||
ONEPROVISION_LIB_PROVISION_FILES:$LIB_LOCATION/oneprovision/lib/provision
|
ONEPROVISION_LIB_PROVISION_FILES:$LIB_LOCATION/oneprovision/lib/provision
|
||||||
@ -1018,9 +1018,9 @@ RUBY_LIB_FILES="src/mad/ruby/ActionManager.rb \
|
|||||||
src/vmm_mad/remotes/az/az_driver.rb \
|
src/vmm_mad/remotes/az/az_driver.rb \
|
||||||
src/vmm_mad/remotes/ec2/ec2_driver.rb \
|
src/vmm_mad/remotes/ec2/ec2_driver.rb \
|
||||||
src/vmm_mad/remotes/one/opennebula_driver.rb \
|
src/vmm_mad/remotes/one/opennebula_driver.rb \
|
||||||
src/vmm_mad/remotes/packet/packet_driver.rb \
|
src/vmm_mad/remotes/equinix/equinix_driver.rb \
|
||||||
src/vnm_mad/remotes/elastic/aws_vnm.rb \
|
src/vnm_mad/remotes/elastic/aws_vnm.rb \
|
||||||
src/vnm_mad/remotes/elastic/packet_vnm.rb \
|
src/vnm_mad/remotes/elastic/equinix_vnm.rb \
|
||||||
src/vnm_mad/remotes/elastic/vultr_vnm.rb"
|
src/vnm_mad/remotes/elastic/vultr_vnm.rb"
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
@ -1369,15 +1369,15 @@ VMM_EXEC_ONE_SCRIPTS="src/vmm_mad/remotes/one/cancel \
|
|||||||
src/vmm_mad/remotes/one/prereconfigure"
|
src/vmm_mad/remotes/one/prereconfigure"
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# VMM Driver Packet scripts, to be installed under $REMOTES_LOCATION/vmm/packet
|
# VMM Driver Equinix scripts, to be installed under $REMOTES_LOCATION/vmm/equinix
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
VMM_EXEC_PACKET_SCRIPTS="src/vmm_mad/remotes/packet/cancel \
|
VMM_EXEC_EQUINIX_SCRIPTS="src/vmm_mad/remotes/equinix/cancel \
|
||||||
src/vmm_mad/remotes/packet/deploy \
|
src/vmm_mad/remotes/equinix/deploy \
|
||||||
src/vmm_mad/remotes/packet/reboot \
|
src/vmm_mad/remotes/equinix/reboot \
|
||||||
src/vmm_mad/remotes/packet/reset \
|
src/vmm_mad/remotes/equinix/reset \
|
||||||
src/vmm_mad/remotes/packet/poll \
|
src/vmm_mad/remotes/equinix/poll \
|
||||||
src/vmm_mad/remotes/packet/shutdown"
|
src/vmm_mad/remotes/equinix/shutdown"
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
# Information Manager Probes, to be installed under $REMOTES_LOCATION/im
|
# Information Manager Probes, to be installed under $REMOTES_LOCATION/im
|
||||||
@ -1662,28 +1662,28 @@ IM_PROBES_ONE_VM_MONITOR_FILES="\
|
|||||||
IM_PROBES_ONE_VM_STATUS_FILES="\
|
IM_PROBES_ONE_VM_STATUS_FILES="\
|
||||||
src/im_mad/remotes/one-probes.d/vm/status/probe_vm_status.rb"
|
src/im_mad/remotes/one-probes.d/vm/status/probe_vm_status.rb"
|
||||||
|
|
||||||
IM_PROBES_PACKET_FILES="src/im_mad/remotes/packet.d/poll"
|
IM_PROBES_EQUINIX_FILES="src/im_mad/remotes/equinix.d/poll"
|
||||||
|
|
||||||
# PACKET monitord-client
|
# EQUINIX monitord-client
|
||||||
IM_PROBES_PACKET_FILES="\
|
IM_PROBES_EQUINIX_FILES="\
|
||||||
src/im_mad/remotes/packet.d/monitord-client_control.sh \
|
src/im_mad/remotes/equinix.d/monitord-client_control.sh \
|
||||||
src/im_mad/remotes/packet.d/monitord-client.rb"
|
src/im_mad/remotes/equinix.d/monitord-client.rb"
|
||||||
|
|
||||||
# PACKET probes
|
# EQUINIX probes
|
||||||
IM_PROBES_PACKET_HOST_BEACON_FILES="\
|
IM_PROBES_EQUINIX_HOST_BEACON_FILES="\
|
||||||
src/im_mad/remotes/packet-probes.d/host/beacon/monitord-client-shepherd_local.sh"
|
src/im_mad/remotes/equinix-probes.d/host/beacon/monitord-client-shepherd_local.sh"
|
||||||
|
|
||||||
IM_PROBES_PACKET_HOST_MONITOR_FILES="\
|
IM_PROBES_EQUINIX_HOST_MONITOR_FILES="\
|
||||||
src/im_mad/remotes/packet-probes.d/host/monitor/probe_host_monitor.rb"
|
src/im_mad/remotes/equinix-probes.d/host/monitor/probe_host_monitor.rb"
|
||||||
|
|
||||||
IM_PROBES_PACKET_HOST_SYSTEM_FILES="\
|
IM_PROBES_EQUINIX_HOST_SYSTEM_FILES="\
|
||||||
src/im_mad/remotes/packet-probes.d/host/system/probe_host_system.rb"
|
src/im_mad/remotes/equinix-probes.d/host/system/probe_host_system.rb"
|
||||||
|
|
||||||
IM_PROBES_PACKET_VM_MONITOR_FILES="\
|
IM_PROBES_EQUINIX_VM_MONITOR_FILES="\
|
||||||
src/im_mad/remotes/packet-probes.d/vm/monitor/probe_vm_monitor.rb"
|
src/im_mad/remotes/equinix-probes.d/vm/monitor/probe_vm_monitor.rb"
|
||||||
|
|
||||||
IM_PROBES_PACKET_VM_STATUS_FILES="\
|
IM_PROBES_EQUINIX_VM_STATUS_FILES="\
|
||||||
src/im_mad/remotes/packet-probes.d/vm/status/probe_vm_status.rb"
|
src/im_mad/remotes/equinix-probes.d/vm/status/probe_vm_status.rb"
|
||||||
|
|
||||||
IM_PROBES_VERSION="src/im_mad/remotes/VERSION"
|
IM_PROBES_VERSION="src/im_mad/remotes/VERSION"
|
||||||
|
|
||||||
@ -1807,13 +1807,13 @@ IPAM_DRIVER_DUMMY_SCRIPTS="src/ipamm_mad/remotes/dummy/register_address_range \
|
|||||||
src/ipamm_mad/remotes/dummy/free_address"
|
src/ipamm_mad/remotes/dummy/free_address"
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
# IPAM Packet drivers to be installed under $REMOTES_LOCATION/ipam
|
# IPAM Equinix drivers to be installed under $REMOTES_LOCATION/ipam
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
IPAM_DRIVER_PACKET_SCRIPTS="src/ipamm_mad/remotes/packet/register_address_range \
|
IPAM_DRIVER_EQUINIX_SCRIPTS="src/ipamm_mad/remotes/equinix/register_address_range \
|
||||||
src/ipamm_mad/remotes/packet/unregister_address_range \
|
src/ipamm_mad/remotes/equinix/unregister_address_range \
|
||||||
src/ipamm_mad/remotes/packet/allocate_address \
|
src/ipamm_mad/remotes/equinix/allocate_address \
|
||||||
src/ipamm_mad/remotes/packet/get_address \
|
src/ipamm_mad/remotes/equinix/get_address \
|
||||||
src/ipamm_mad/remotes/packet/free_address"
|
src/ipamm_mad/remotes/equinix/free_address"
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
# IPAM Vultr drivers to be installed under $REMOTES_LOCATION/ipam
|
# IPAM Vultr drivers to be installed under $REMOTES_LOCATION/ipam
|
||||||
@ -2570,7 +2570,7 @@ ONEPROVISION_LIB_PROVIDERS_FILES="src/oneprovision/lib/terraform/providers/aws.r
|
|||||||
src/oneprovision/lib/terraform/providers/digitalocean.rb \
|
src/oneprovision/lib/terraform/providers/digitalocean.rb \
|
||||||
src/oneprovision/lib/terraform/providers/dummy.rb \
|
src/oneprovision/lib/terraform/providers/dummy.rb \
|
||||||
src/oneprovision/lib/terraform/providers/example \
|
src/oneprovision/lib/terraform/providers/example \
|
||||||
src/oneprovision/lib/terraform/providers/packet.rb \
|
src/oneprovision/lib/terraform/providers/equinix.rb \
|
||||||
src/oneprovision/lib/terraform/providers/vultr.rb \
|
src/oneprovision/lib/terraform/providers/vultr.rb \
|
||||||
src/oneprovision/lib/terraform/providers/vultr_metal.rb \
|
src/oneprovision/lib/terraform/providers/vultr_metal.rb \
|
||||||
src/oneprovision/lib/terraform/providers/vultr_virtual.rb"
|
src/oneprovision/lib/terraform/providers/vultr_virtual.rb"
|
||||||
@ -2593,11 +2593,11 @@ ONEPROVISION_LIB_DIGITALOCEAN_ERB_FILES="src/oneprovision/lib/terraform/provider
|
|||||||
src/oneprovision/lib/terraform/providers/templates/digitalocean/network.erb \
|
src/oneprovision/lib/terraform/providers/templates/digitalocean/network.erb \
|
||||||
src/oneprovision/lib/terraform/providers/templates/digitalocean/provider.erb"
|
src/oneprovision/lib/terraform/providers/templates/digitalocean/provider.erb"
|
||||||
|
|
||||||
ONEPROVISION_LIB_PACKET_ERB_FILES="src/oneprovision/lib/terraform/providers/templates/packet/cluster.erb \
|
ONEPROVISION_LIB_EQUINIX_ERB_FILES="src/oneprovision/lib/terraform/providers/templates/equinix/cluster.erb \
|
||||||
src/oneprovision/lib/terraform/providers/templates/packet/datastore.erb \
|
src/oneprovision/lib/terraform/providers/templates/equinix/datastore.erb \
|
||||||
src/oneprovision/lib/terraform/providers/templates/packet/host.erb \
|
src/oneprovision/lib/terraform/providers/templates/equinix/host.erb \
|
||||||
src/oneprovision/lib/terraform/providers/templates/packet/network.erb \
|
src/oneprovision/lib/terraform/providers/templates/equinix/network.erb \
|
||||||
src/oneprovision/lib/terraform/providers/templates/packet/provider.erb"
|
src/oneprovision/lib/terraform/providers/templates/equinix/provider.erb"
|
||||||
|
|
||||||
ONEPROVISION_LIB_VULTR_METAL_ERB_FILES="src/oneprovision/lib/terraform/providers/templates/vultr_metal/cluster.erb \
|
ONEPROVISION_LIB_VULTR_METAL_ERB_FILES="src/oneprovision/lib/terraform/providers/templates/vultr_metal/cluster.erb \
|
||||||
src/oneprovision/lib/terraform/providers/templates/vultr_metal/datastore.erb \
|
src/oneprovision/lib/terraform/providers/templates/vultr_metal/datastore.erb \
|
||||||
@ -2852,7 +2852,7 @@ FIREEDGE_PROVISION_ETC_PROVIDERS="src/fireedge/etc/provision/providers.d/aws.yam
|
|||||||
src/fireedge/etc/provision/providers.d/digitalocean.yaml \
|
src/fireedge/etc/provision/providers.d/digitalocean.yaml \
|
||||||
src/fireedge/etc/provision/providers.d/dummy.yaml \
|
src/fireedge/etc/provision/providers.d/dummy.yaml \
|
||||||
src/fireedge/etc/provision/providers.d/google.yaml \
|
src/fireedge/etc/provision/providers.d/google.yaml \
|
||||||
src/fireedge/etc/provision/providers.d/packet.yaml \
|
src/fireedge/etc/provision/providers.d/equinix.yaml \
|
||||||
src/fireedge/etc/provision/providers.d/vultr_metal.yaml \
|
src/fireedge/etc/provision/providers.d/vultr_metal.yaml \
|
||||||
src/fireedge/etc/provision/providers.d/vultr_virtual.yaml"
|
src/fireedge/etc/provision/providers.d/vultr_virtual.yaml"
|
||||||
|
|
||||||
|
@ -668,7 +668,7 @@ MARKET_MAD = [
|
|||||||
|
|
||||||
IPAM_MAD = [
|
IPAM_MAD = [
|
||||||
EXECUTABLE = "one_ipam",
|
EXECUTABLE = "one_ipam",
|
||||||
ARGUMENTS = "-t 1 -i dummy,aws,packet,vultr"
|
ARGUMENTS = "-t 1 -i dummy,aws,equinix,vultr"
|
||||||
]
|
]
|
||||||
|
|
||||||
#*******************************************************************************
|
#*******************************************************************************
|
||||||
@ -975,20 +975,10 @@ HOST_ENCRYPTED_ATTR = "VCENTER_PASSWORD"
|
|||||||
HOST_ENCRYPTED_ATTR = "NSX_PASSWORD"
|
HOST_ENCRYPTED_ATTR = "NSX_PASSWORD"
|
||||||
HOST_ENCRYPTED_ATTR = "ONE_PASSWORD"
|
HOST_ENCRYPTED_ATTR = "ONE_PASSWORD"
|
||||||
|
|
||||||
# CLUSTER_ENCRYPTED_ATTR = "PROVISION/PACKET_TOKEN"
|
|
||||||
|
|
||||||
# DATASTORE_ENCRYPTED_ATTR = "PROVISION/PACKET_TOKEN"
|
|
||||||
|
|
||||||
# VM_ENCRYPTED_ATTR = "PACKET_TOKEN
|
|
||||||
# VM_ENCRYPTED_ATTR = "PROVISION/PACKET_TOKEN
|
|
||||||
VM_ENCRYPTED_ATTR = "CONTEXT/PASSWORD"
|
VM_ENCRYPTED_ATTR = "CONTEXT/PASSWORD"
|
||||||
|
|
||||||
IMAGE_ENCRYPTED_ATTR = "LUKS_PASSWORD"
|
IMAGE_ENCRYPTED_ATTR = "LUKS_PASSWORD"
|
||||||
|
|
||||||
# VNET_ENCRYPTED_ATTR = "PROVISION/PACKET_TOKEN
|
|
||||||
# VNET_ENCRYPTED_ATTR = "PROVISION/PACKET_TOKEN
|
|
||||||
# VNET_ENCRYPTED_ATTR = "PROVISION/PACKET_TOKEN
|
|
||||||
|
|
||||||
# DDC encrypted attrs
|
# DDC encrypted attrs
|
||||||
DOCUMENT_ENCRYPTED_ATTR = "PROVISION_BODY"
|
DOCUMENT_ENCRYPTED_ATTR = "PROVISION_BODY"
|
||||||
|
|
||||||
|
@ -63,12 +63,12 @@ AllCops:
|
|||||||
- src/pm_mad/remotes/dummy/deploy
|
- src/pm_mad/remotes/dummy/deploy
|
||||||
- src/pm_mad/remotes/dummy/reset
|
- src/pm_mad/remotes/dummy/reset
|
||||||
- src/pm_mad/remotes/dummy/poll
|
- src/pm_mad/remotes/dummy/poll
|
||||||
- src/pm_mad/remotes/packet/cancel
|
- src/pm_mad/remotes/equinix/cancel
|
||||||
- src/pm_mad/remotes/packet/shutdown
|
- src/pm_mad/remotes/equinix/shutdown
|
||||||
- src/pm_mad/remotes/packet/reboot
|
- src/pm_mad/remotes/equinix/reboot
|
||||||
- src/pm_mad/remotes/packet/deploy
|
- src/pm_mad/remotes/equinix/deploy
|
||||||
- src/pm_mad/remotes/packet/reset
|
- src/pm_mad/remotes/equinix/reset
|
||||||
- src/pm_mad/remotes/packet/poll
|
- src/pm_mad/remotes/equinix/poll
|
||||||
- src/pm_mad/remotes/ec2/cancel
|
- src/pm_mad/remotes/ec2/cancel
|
||||||
- src/pm_mad/remotes/ec2/shutdown
|
- src/pm_mad/remotes/ec2/shutdown
|
||||||
- src/pm_mad/remotes/ec2/reboot
|
- src/pm_mad/remotes/ec2/reboot
|
||||||
@ -82,7 +82,7 @@ AllCops:
|
|||||||
- src/im_mad/remotes/kvm-probes.d/pci.rb
|
- src/im_mad/remotes/kvm-probes.d/pci.rb
|
||||||
- src/im_mad/remotes/kvm.d/monitord-client.rb
|
- src/im_mad/remotes/kvm.d/monitord-client.rb
|
||||||
- src/im_mad/remotes/lxd.d/monitord-client.rb
|
- src/im_mad/remotes/lxd.d/monitord-client.rb
|
||||||
- src/im_mad/remotes/packet.d/poll
|
- src/im_mad/remotes/equinix.d/poll
|
||||||
- src/im_mad/remotes/ec2.d/poll
|
- src/im_mad/remotes/ec2.d/poll
|
||||||
- src/im_mad/remotes/one.d/poll
|
- src/im_mad/remotes/one.d/poll
|
||||||
- src/im_mad/remotes/az.d/poll
|
- src/im_mad/remotes/az.d/poll
|
||||||
@ -137,12 +137,12 @@ AllCops:
|
|||||||
- src/vmm_mad/remotes/az/save
|
- src/vmm_mad/remotes/az/save
|
||||||
- src/vmm_mad/remotes/az/restore
|
- src/vmm_mad/remotes/az/restore
|
||||||
- src/vmm_mad/remotes/az/poll
|
- src/vmm_mad/remotes/az/poll
|
||||||
- src/vmm_mad/remotes/packet/cancel
|
- src/vmm_mad/remotes/equinix/cancel
|
||||||
- src/vmm_mad/remotes/packet/shutdown
|
- src/vmm_mad/remotes/equinix/shutdown
|
||||||
- src/vmm_mad/remotes/packet/reboot
|
- src/vmm_mad/remotes/equinix/reboot
|
||||||
- src/vmm_mad/remotes/packet/deploy
|
- src/vmm_mad/remotes/equinix/deploy
|
||||||
- src/vmm_mad/remotes/packet/reset
|
- src/vmm_mad/remotes/equinix/reset
|
||||||
- src/vmm_mad/remotes/packet/poll
|
- src/vmm_mad/remotes/equinix/poll
|
||||||
- src/vmm_mad/remotes/ec2/cancel
|
- src/vmm_mad/remotes/ec2/cancel
|
||||||
- src/vmm_mad/remotes/ec2/shutdown
|
- src/vmm_mad/remotes/ec2/shutdown
|
||||||
- src/vmm_mad/remotes/ec2/reboot
|
- src/vmm_mad/remotes/ec2/reboot
|
||||||
@ -386,7 +386,7 @@ AllCops:
|
|||||||
- src/vmm_mad/remotes/lib/lxd/opennebula_vm.rb
|
- src/vmm_mad/remotes/lib/lxd/opennebula_vm.rb
|
||||||
- src/vmm_mad/remotes/lib/lxd/command.rb
|
- src/vmm_mad/remotes/lib/lxd/command.rb
|
||||||
- src/vmm_mad/remotes/lib/poll_common.rb
|
- src/vmm_mad/remotes/lib/poll_common.rb
|
||||||
- src/vmm_mad/remotes/packet/packet_driver.rb
|
- src/vmm_mad/remotes/equinix/equinix_driver.rb
|
||||||
- src/vmm_mad/remotes/ec2/ec2_driver.rb
|
- src/vmm_mad/remotes/ec2/ec2_driver.rb
|
||||||
- src/mad/ruby/ssh_stream.rb
|
- src/mad/ruby/ssh_stream.rb
|
||||||
- src/mad/ruby/test/MonkeyPatcher.rb
|
- src/mad/ruby/test/MonkeyPatcher.rb
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
name: 'packet-amsterdam'
|
name: 'equinix-amsterdam'
|
||||||
|
|
||||||
description: 'Edge cluster in Equinix Amsterdam'
|
description: 'Edge cluster in Equinix Amsterdam'
|
||||||
provider: 'packet'
|
provider: 'equinix'
|
||||||
|
|
||||||
connection:
|
connection:
|
||||||
token: 'Packet token'
|
token: 'Equinix token'
|
||||||
project: 'Packet project'
|
project: 'Equinix project'
|
||||||
facility: 'ams1'
|
facility: 'ams1'
|
||||||
|
|
||||||
inputs:
|
inputs:
|
||||||
- name: 'packet_os'
|
- name: 'equinix_os'
|
||||||
type: 'list'
|
type: 'list'
|
||||||
options:
|
options:
|
||||||
- 'centos_8'
|
- 'centos_8'
|
||||||
- name: 'packet_plan'
|
- name: 'equinix_plan'
|
||||||
type: 'list'
|
type: 'list'
|
||||||
options:
|
options:
|
||||||
- 'baremetal_0'
|
- 'baremetal_0'
|
@ -1,19 +1,19 @@
|
|||||||
name: 'packet-ewr1'
|
name: 'equinix-ewr1'
|
||||||
|
|
||||||
description: 'Edge cluster in Equinix Parsippany, USA, NJ'
|
description: 'Edge cluster in Equinix Parsippany, USA, NJ'
|
||||||
provider: 'packet'
|
provider: 'equinix'
|
||||||
|
|
||||||
connection:
|
connection:
|
||||||
token: 'Packet token'
|
token: 'Equinix token'
|
||||||
project: 'Packet project'
|
project: 'Equinix project'
|
||||||
facility: 'ewr1'
|
facility: 'ewr1'
|
||||||
|
|
||||||
inputs:
|
inputs:
|
||||||
- name: 'packet_os'
|
- name: 'equinix_os'
|
||||||
type: 'list'
|
type: 'list'
|
||||||
options:
|
options:
|
||||||
- 'centos_8'
|
- 'centos_8'
|
||||||
- name: 'packet_plan'
|
- name: 'equinix_plan'
|
||||||
type: 'list'
|
type: 'list'
|
||||||
options:
|
options:
|
||||||
- 't1.small'
|
- 't1.small'
|
@ -1,19 +1,19 @@
|
|||||||
name: 'packet-nrt1'
|
name: 'equinix-nrt1'
|
||||||
|
|
||||||
description: 'Edge cluster in Equinix Tokyo, Japan'
|
description: 'Edge cluster in Equinix Tokyo, Japan'
|
||||||
provider: 'packet'
|
provider: 'equinix'
|
||||||
|
|
||||||
connection:
|
connection:
|
||||||
token: 'Packet token'
|
token: 'Equinix token'
|
||||||
project: 'Packet project'
|
project: 'Equinix project'
|
||||||
facility: 'nrt1'
|
facility: 'nrt1'
|
||||||
|
|
||||||
inputs:
|
inputs:
|
||||||
- name: 'packet_os'
|
- name: 'equinix_os'
|
||||||
type: 'list'
|
type: 'list'
|
||||||
options:
|
options:
|
||||||
- 'centos_8'
|
- 'centos_8'
|
||||||
- name: 'packet_plan'
|
- name: 'equinix_plan'
|
||||||
type: 'list'
|
type: 'list'
|
||||||
options:
|
options:
|
||||||
- 't1.small'
|
- 't1.small'
|
@ -1,19 +1,19 @@
|
|||||||
name: 'packet-sjc1'
|
name: 'equinix-sjc1'
|
||||||
|
|
||||||
description: 'Edge cluster in Equinix, USA, CA'
|
description: 'Edge cluster in Equinix, USA, CA'
|
||||||
provider: 'packet'
|
provider: 'equinix'
|
||||||
|
|
||||||
connection:
|
connection:
|
||||||
token: 'Packet token'
|
token: 'Equinix token'
|
||||||
project: 'Packet project'
|
project: 'Equinix project'
|
||||||
facility: 'sjc1'
|
facility: 'sjc1'
|
||||||
|
|
||||||
inputs:
|
inputs:
|
||||||
- name: 'packet_os'
|
- name: 'equinix_os'
|
||||||
type: 'list'
|
type: 'list'
|
||||||
options:
|
options:
|
||||||
- 'centos_8'
|
- 'centos_8'
|
||||||
- name: 'packet_plan'
|
- name: 'equinix_plan'
|
||||||
type: 'list'
|
type: 'list'
|
||||||
options:
|
options:
|
||||||
- 't1.small'
|
- 't1.small'
|
@ -16,7 +16,7 @@
|
|||||||
# ---------------------------------------------------------------------------- #
|
# ---------------------------------------------------------------------------- #
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
# hosts: Packet or AWS metal servers
|
# hosts: Equinix or AWS metal servers
|
||||||
# provision:
|
# provision:
|
||||||
# - count: Number of servers to create
|
# - count: Number of servers to create
|
||||||
# - hostname: kvm-host1, kvm-host2 .... of the server
|
# - hostname: kvm-host1, kvm-host2 .... of the server
|
||||||
|
@ -16,5 +16,4 @@
|
|||||||
# ---------------------------------------------------------------------------- #
|
# ---------------------------------------------------------------------------- #
|
||||||
|
|
||||||
image: 'OPENNEBULA-EQUINIX'
|
image: 'OPENNEBULA-EQUINIX'
|
||||||
provider: 'packet'
|
provider: 'equinix'
|
||||||
provision_type: 'metal'
|
|
@ -31,14 +31,14 @@ inputs:
|
|||||||
description: 'Comma separated list of DNS servers for public network'
|
description: 'Comma separated list of DNS servers for public network'
|
||||||
default: '1.1.1.1'
|
default: '1.1.1.1'
|
||||||
|
|
||||||
- name: 'packet_plan'
|
- name: 'equinix_plan'
|
||||||
type: text
|
type: text
|
||||||
description: "Packet plan (device type)"
|
description: "Equinix plan (device type)"
|
||||||
default: 'baremetal_0'
|
default: 'baremetal_0'
|
||||||
|
|
||||||
- name: 'packet_os'
|
- name: 'equinix_os'
|
||||||
type: text
|
type: text
|
||||||
description: "Packet host operating system"
|
description: "Equinix host operating system"
|
||||||
default: 'centos_8'
|
default: 'centos_8'
|
||||||
|
|
||||||
- name: 'one_hypervisor'
|
- name: 'one_hypervisor'
|
@ -26,8 +26,8 @@ networks:
|
|||||||
ar:
|
ar:
|
||||||
- provison_id: "${provision_id}"
|
- provison_id: "${provision_id}"
|
||||||
size: '1'
|
size: '1'
|
||||||
packet_ip_type: 'public_ipv4'
|
equinix_ip_type: 'public_ipv4'
|
||||||
ipam_mad: 'packet'
|
ipam_mad: 'equinix'
|
||||||
|
|
||||||
vntemplates:
|
vntemplates:
|
||||||
- name: "${provision}-private"
|
- name: "${provision}-private"
|
@ -16,36 +16,36 @@
|
|||||||
# ---------------------------------------------------------------------------- #
|
# ---------------------------------------------------------------------------- #
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
# This is the canonical description file for a cluster build with 'Packet'
|
# This is the canonical description file for a cluster build with 'Equinix'
|
||||||
# resources using the KVM hypervisor.
|
# resources using the KVM hypervisor.
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
|
|
||||||
name: 'packet-cluster'
|
name: 'equinix-cluster'
|
||||||
|
|
||||||
extends:
|
extends:
|
||||||
- common.d/defaults.yml
|
- common.d/defaults.yml
|
||||||
- common.d/resources.yml
|
- common.d/resources.yml
|
||||||
- common.d/hosts.yml
|
- common.d/hosts.yml
|
||||||
- packet.d/datastores.yml
|
- equinix.d/datastores.yml
|
||||||
- packet.d/fireedge.yml
|
- equinix.d/fireedge.yml
|
||||||
- packet.d/inputs.yml
|
- equinix.d/inputs.yml
|
||||||
- packet.d/networks.yml
|
- equinix.d/networks.yml
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
# playbook: Ansible playbook used for hosts configuration. Check
|
# playbook: Ansible playbook used for hosts configuration. Check
|
||||||
# ansible/packet.yml for the specific roles applied.
|
# ansible/equinix.yml for the specific roles applied.
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
playbook:
|
playbook:
|
||||||
- packet
|
- equinix
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
# defaults: Common configuration attributes for provision objects
|
# defaults: Common configuration attributes for provision objects
|
||||||
#--------------------------------------------------------------------------------
|
#--------------------------------------------------------------------------------
|
||||||
defaults:
|
defaults:
|
||||||
provision:
|
provision:
|
||||||
provider_name: 'packet'
|
provider_name: 'equinix'
|
||||||
plan: "${input.packet_plan}"
|
plan: "${input.equinix_plan}"
|
||||||
os: "${input.packet_os}"
|
os: "${input.equinix_os}"
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
# cluster: Parameters for the OpenNebula cluster. Applies to all the Hosts
|
# cluster: Parameters for the OpenNebula cluster. Applies to all the Hosts
|
@ -16,7 +16,7 @@
|
|||||||
# ---------------------------------------------------------------------------- #
|
# ---------------------------------------------------------------------------- #
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
# hosts: Packet or AWS metal servers
|
# hosts: Physical servers
|
||||||
# provision:
|
# provision:
|
||||||
# - count: Number of servers to create
|
# - count: Number of servers to create
|
||||||
# - hostname: kvm-host1, kvm-host2 .... of the server
|
# - hostname: kvm-host1, kvm-host2 .... of the server
|
||||||
|
@ -17,4 +17,3 @@
|
|||||||
|
|
||||||
image: 'OPENNEBULA-DIGITALOCEAN'
|
image: 'OPENNEBULA-DIGITALOCEAN'
|
||||||
provider: 'digitalocean'
|
provider: 'digitalocean'
|
||||||
provision_type: 'virtual'
|
|
||||||
|
@ -17,4 +17,3 @@
|
|||||||
|
|
||||||
image: 'OPENNEBULA-VULTR'
|
image: 'OPENNEBULA-VULTR'
|
||||||
provider: 'vultr_virtual'
|
provider: 'vultr_virtual'
|
||||||
provision_type: 'virtual'
|
|
||||||
|
@ -112,22 +112,6 @@ CommandParser::CmdParser.new(ARGV) do
|
|||||||
|
|
||||||
create_desc = <<-EOT.unindent
|
create_desc = <<-EOT.unindent
|
||||||
Allocate a new provider. Configuration file must be written in YAML.
|
Allocate a new provider. Configuration file must be written in YAML.
|
||||||
|
|
||||||
$ cat packet.yaml
|
|
||||||
name: 'packet_custom'
|
|
||||||
provider: 'packet'
|
|
||||||
connection:
|
|
||||||
packet_token: "Packet token"
|
|
||||||
packet_project: "Packet project"
|
|
||||||
facility: "Packet facility"
|
|
||||||
|
|
||||||
$ cat ec2.yaml
|
|
||||||
name: 'aws_custom',
|
|
||||||
provider: 'aws'
|
|
||||||
connection:
|
|
||||||
ec2_access: "AWS access key"
|
|
||||||
ec2_secret: "AWS secret key"
|
|
||||||
region_name: "AWS region name""
|
|
||||||
EOT
|
EOT
|
||||||
|
|
||||||
command :create, create_desc, :template do
|
command :create, create_desc, :template do
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
name: 'Packet'
|
name: 'Equinix'
|
||||||
image: 'EQUINIX'
|
image: 'EQUINIX'
|
||||||
provision_type: 'metal'
|
provision_type: 'metal'
|
||||||
location_key: 'facility'
|
location_key: 'facility'
|
@ -149,7 +149,7 @@ end
|
|||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
# Script helper functions and gLobals
|
# Script helper functions and gLobals
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
LOCAL_HYPERVISOR = %w[az ec2 one packet].freeze
|
LOCAL_HYPERVISOR = %w[az ec2 one equinix].freeze
|
||||||
|
|
||||||
def local?(hypervisor)
|
def local?(hypervisor)
|
||||||
LOCAL_HYPERVISOR.include?(hypervisor)
|
LOCAL_HYPERVISOR.include?(hypervisor)
|
||||||
|
@ -48,14 +48,14 @@ end
|
|||||||
|
|
||||||
$LOAD_PATH << RUBY_LIB_LOCATION
|
$LOAD_PATH << RUBY_LIB_LOCATION
|
||||||
|
|
||||||
require 'packet_driver'
|
require 'equinix_driver'
|
||||||
|
|
||||||
host = ARGV[-1]
|
host = ARGV[-1]
|
||||||
host_id = ARGV[-2]
|
host_id = ARGV[-2]
|
||||||
packet_drv = PacketDriver.new(host, host_id)
|
equinix_drv = EquinixDriver.new(host, host_id)
|
||||||
|
|
||||||
begin
|
begin
|
||||||
puts packet_drv.probe_host_monitor
|
puts equinix_drv.probe_host_monitor
|
||||||
rescue StandardError => e
|
rescue StandardError => e
|
||||||
OpenNebula.handle_driver_exception('im probe_host_monitor', e, host)
|
OpenNebula.handle_driver_exception('im probe_host_monitor', e, host)
|
||||||
end
|
end
|
@ -48,14 +48,14 @@ end
|
|||||||
|
|
||||||
$LOAD_PATH << RUBY_LIB_LOCATION
|
$LOAD_PATH << RUBY_LIB_LOCATION
|
||||||
|
|
||||||
require 'packet_driver'
|
require 'equinix_driver'
|
||||||
|
|
||||||
host = ARGV[-1]
|
host = ARGV[-1]
|
||||||
host_id = ARGV[-2]
|
host_id = ARGV[-2]
|
||||||
packet_drv = PacketDriver.new(host, host_id)
|
equinix_drv = EquinixDriver.new(host, host_id)
|
||||||
|
|
||||||
begin
|
begin
|
||||||
puts packet_drv.probe_host_system
|
puts equinix_drv.probe_host_system
|
||||||
rescue StandardError => e
|
rescue StandardError => e
|
||||||
OpenNebula.handle_driver_exception('im probe_host_system', e, host)
|
OpenNebula.handle_driver_exception('im probe_host_system', e, host)
|
||||||
end
|
end
|
@ -48,14 +48,14 @@ end
|
|||||||
|
|
||||||
$LOAD_PATH << RUBY_LIB_LOCATION
|
$LOAD_PATH << RUBY_LIB_LOCATION
|
||||||
|
|
||||||
require 'packet_driver'
|
require 'equinix_driver'
|
||||||
|
|
||||||
host = ARGV[-1]
|
host = ARGV[-1]
|
||||||
host_id = ARGV[-2]
|
host_id = ARGV[-2]
|
||||||
packet_drv = PacketDriver.new(host, host_id)
|
equinix_drv = EquinixDriver.new(host, host_id)
|
||||||
|
|
||||||
begin
|
begin
|
||||||
puts packet_drv.probe_vm_monitor
|
puts equinix_drv.probe_vm_monitor
|
||||||
rescue StandardError => e
|
rescue StandardError => e
|
||||||
OpenNebula.handle_driver_exception('im probe_vm_monitor', e, host)
|
OpenNebula.handle_driver_exception('im probe_vm_monitor', e, host)
|
||||||
end
|
end
|
@ -48,14 +48,14 @@ end
|
|||||||
|
|
||||||
$LOAD_PATH << RUBY_LIB_LOCATION
|
$LOAD_PATH << RUBY_LIB_LOCATION
|
||||||
|
|
||||||
require 'packet_driver'
|
require 'equinix_driver'
|
||||||
require_relative '../../../lib/probe_db'
|
require_relative '../../../lib/probe_db'
|
||||||
|
|
||||||
host = ARGV[-1]
|
host = ARGV[-1]
|
||||||
host_id = ARGV[-2]
|
host_id = ARGV[-2]
|
||||||
|
|
||||||
begin
|
begin
|
||||||
vmdb = VirtualMachineDB.new('packet',
|
vmdb = VirtualMachineDB.new('equinix',
|
||||||
host,
|
host,
|
||||||
host_id,
|
host_id,
|
||||||
:missing_state => 'UNKNOWN',
|
:missing_state => 'UNKNOWN',
|
@ -27,8 +27,8 @@
|
|||||||
# XML format
|
# XML format
|
||||||
# <IPAM_DRIVER_ACTION_DATA>
|
# <IPAM_DRIVER_ACTION_DATA>
|
||||||
# <AR>
|
# <AR>
|
||||||
# <DEPLOY_ID>Packet AR ID</DEPLOY_ID>
|
# <DEPLOY_ID>Equinix AR ID</DEPLOY_ID>
|
||||||
# <PACKET_TOKEN>Packet auth token</PACKET_TOKEN>
|
# <EQUINIX_TOKEN>Equinix auth token</EQUINIX_TOKEN>
|
||||||
# </AR>
|
# </AR>
|
||||||
# <ADDRESS>
|
# <ADDRESS>
|
||||||
# <IP>
|
# <IP>
|
@ -40,7 +40,7 @@
|
|||||||
# The response MUST include IPAM_MAD, TYPE, IP and SIZE attributes, example:
|
# The response MUST include IPAM_MAD, TYPE, IP and SIZE attributes, example:
|
||||||
# - A basic network definition
|
# - A basic network definition
|
||||||
# AR = [
|
# AR = [
|
||||||
# IPAM_MAD = "packet",
|
# IPAM_MAD = "equinix",
|
||||||
# TYPE = "IP4",
|
# TYPE = "IP4",
|
||||||
# IP = "10.0.0.1",
|
# IP = "10.0.0.1",
|
||||||
# SIZE = "255",
|
# SIZE = "255",
|
||||||
@ -50,7 +50,7 @@
|
|||||||
# - A complete network definition. Custom attributes (free form, key-value)
|
# - A complete network definition. Custom attributes (free form, key-value)
|
||||||
# can be added, named cannot be repeated.
|
# can be added, named cannot be repeated.
|
||||||
# AR = [
|
# AR = [
|
||||||
# IPAM_MAD = "packet",
|
# IPAM_MAD = "equinix",
|
||||||
# TYPE = "IP4",
|
# TYPE = "IP4",
|
||||||
# IP = "10.0.0.2",
|
# IP = "10.0.0.2",
|
||||||
# SIZE = "200",
|
# SIZE = "200",
|
||||||
@ -68,12 +68,12 @@ ONE_LOCATION = ENV['ONE_LOCATION'] unless defined?(ONE_LOCATION)
|
|||||||
|
|
||||||
if !ONE_LOCATION
|
if !ONE_LOCATION
|
||||||
LIB_LOCATION = '/usr/lib/one'
|
LIB_LOCATION = '/usr/lib/one'
|
||||||
PACKET_LOCATION = '/usr/lib/one/ruby/vendors/packethost/lib'
|
EQUINIX_LOCATION = '/usr/lib/one/ruby/vendors/packethost/lib'
|
||||||
RUBY_LIB_LOCATION = '/usr/lib/one/ruby'
|
RUBY_LIB_LOCATION = '/usr/lib/one/ruby'
|
||||||
GEMS_LOCATION = '/usr/share/one/gems'
|
GEMS_LOCATION = '/usr/share/one/gems'
|
||||||
else
|
else
|
||||||
LIB_LOCATION = ONE_LOCATION + '/lib'
|
LIB_LOCATION = ONE_LOCATION + '/lib'
|
||||||
PACKET_LOCATION = ONE_LOCATION + '/lib/ruby/vendors/packethost/lib'
|
EQUINIX_LOCATION = ONE_LOCATION + '/lib/ruby/vendors/packethost/lib'
|
||||||
RUBY_LIB_LOCATION = ONE_LOCATION + '/lib/ruby'
|
RUBY_LIB_LOCATION = ONE_LOCATION + '/lib/ruby'
|
||||||
GEMS_LOCATION = ONE_LOCATION + '/share/gems'
|
GEMS_LOCATION = ONE_LOCATION + '/share/gems'
|
||||||
end
|
end
|
||||||
@ -98,7 +98,7 @@ if File.directory?(GEMS_LOCATION)
|
|||||||
end
|
end
|
||||||
# %%RUBYGEMS_SETUP_END%%
|
# %%RUBYGEMS_SETUP_END%%
|
||||||
|
|
||||||
$LOAD_PATH << PACKET_LOCATION
|
$LOAD_PATH << EQUINIX_LOCATION
|
||||||
$LOAD_PATH << RUBY_LIB_LOCATION
|
$LOAD_PATH << RUBY_LIB_LOCATION
|
||||||
$LOAD_PATH << LIB_LOCATION + '/oneprovision/lib'
|
$LOAD_PATH << LIB_LOCATION + '/oneprovision/lib'
|
||||||
|
|
||||||
@ -173,7 +173,7 @@ begin
|
|||||||
pk_facility = connect['facility']
|
pk_facility = connect['facility']
|
||||||
|
|
||||||
# --------------------------------------------------------------------------
|
# --------------------------------------------------------------------------
|
||||||
# Connect to Packet and allocate a new IP
|
# Connect to Equinix and allocate a new IP
|
||||||
# --------------------------------------------------------------------------
|
# --------------------------------------------------------------------------
|
||||||
private_cidr = data.xpath('//AR/PRIVATE_CIDR').text
|
private_cidr = data.xpath('//AR/PRIVATE_CIDR').text
|
||||||
|
|
||||||
@ -184,13 +184,13 @@ begin
|
|||||||
cidr = IPAddr.new(private_cidr)
|
cidr = IPAddr.new(private_cidr)
|
||||||
mask = 0x0FFFFFFFF >> cidr.prefix
|
mask = 0x0FFFFFFFF >> cidr.prefix
|
||||||
|
|
||||||
packet = Packet::Client.new
|
equinix = Packet::Client.new
|
||||||
packet.auth_token = pk_token
|
equinix.auth_token = pk_token
|
||||||
|
|
||||||
ip = Packet::Ip.new
|
ip = Packet::Ip.new
|
||||||
ip.project_id = pk_project
|
ip.project_id = pk_project
|
||||||
ip.facility = pk_facility
|
ip.facility = pk_facility
|
||||||
ip.type = data.xpath('//AR/PACKET_IP_TYPE').text
|
ip.type = data.xpath('//AR/EQUINIX_IP_TYPE').text
|
||||||
ip.quantity = data.xpath('//AR/SIZE').text.to_i
|
ip.quantity = data.xpath('//AR/SIZE').text.to_i
|
||||||
|
|
||||||
if ip.quantity != 1
|
if ip.quantity != 1
|
||||||
@ -206,7 +206,7 @@ begin
|
|||||||
exit(-1)
|
exit(-1)
|
||||||
end
|
end
|
||||||
|
|
||||||
packet.create_ip(ip)
|
equinix.create_ip(ip)
|
||||||
|
|
||||||
ipmd5 = Digest::MD5.hexdigest(ip.address.to_s).to_i(16) & mask
|
ipmd5 = Digest::MD5.hexdigest(ip.address.to_s).to_i(16) & mask
|
||||||
eip = IPAddr.new(ipmd5, Socket::AF_INET)
|
eip = IPAddr.new(ipmd5, Socket::AF_INET)
|
||||||
@ -219,11 +219,11 @@ begin
|
|||||||
TYPE = "IP4",
|
TYPE = "IP4",
|
||||||
IP = "#{ipvm}",
|
IP = "#{ipvm}",
|
||||||
SIZE = "#{ip.quantity}",
|
SIZE = "#{ip.quantity}",
|
||||||
IPAM_MAD = "packet",
|
IPAM_MAD = "equinix",
|
||||||
GATEWAY = "#{ipgw}",
|
GATEWAY = "#{ipgw}",
|
||||||
EXTERNAL_IP = "#{ip.address}",
|
EXTERNAL_IP = "#{ip.address}",
|
||||||
NETWORK_MASK = "255.255.255.254",
|
NETWORK_MASK = "255.255.255.254",
|
||||||
PACKET_IP_ID = "#{ip.id}",
|
EQUINIX_IP_ID = "#{ip.id}",
|
||||||
PROVISION_ID = "#{provision_id}"
|
PROVISION_ID = "#{provision_id}"
|
||||||
]
|
]
|
||||||
EOF
|
EOF
|
@ -25,8 +25,8 @@
|
|||||||
# XML format
|
# XML format
|
||||||
# <IPAM_DRIVER_ACTION_DATA>
|
# <IPAM_DRIVER_ACTION_DATA>
|
||||||
# <AR>
|
# <AR>
|
||||||
# <DEPLOY_ID>Packet AR ID</DEPLOY_ID>
|
# <DEPLOY_ID>Equinix AR ID</DEPLOY_ID>
|
||||||
# <PACKET_TOKEN>Packet auth token</PACKET_TOKEN>
|
# <EQUINIX_TOKEN>Equinix auth token</EQUINIX_TOKEN>
|
||||||
# </AR>
|
# </AR>
|
||||||
# </IPAM_DRIVER_ACTION_DATA>
|
# </IPAM_DRIVER_ACTION_DATA>
|
||||||
#
|
#
|
||||||
@ -35,12 +35,12 @@ ONE_LOCATION = ENV['ONE_LOCATION'] unless defined?(ONE_LOCATION)
|
|||||||
|
|
||||||
if !ONE_LOCATION
|
if !ONE_LOCATION
|
||||||
LIB_LOCATION ||= '/usr/lib/one'
|
LIB_LOCATION ||= '/usr/lib/one'
|
||||||
PACKET_LOCATION ||= '/usr/lib/one/ruby/vendors/packethost/lib'
|
EQUINIX_LOCATION ||= '/usr/lib/one/ruby/vendors/packethost/lib'
|
||||||
RUBY_LIB_LOCATION ||= '/usr/lib/one/ruby'
|
RUBY_LIB_LOCATION ||= '/usr/lib/one/ruby'
|
||||||
GEMS_LOCATION ||= '/usr/share/one/gems'
|
GEMS_LOCATION ||= '/usr/share/one/gems'
|
||||||
else
|
else
|
||||||
LIB_LOCATION ||= ONE_LOCATION + '/lib'
|
LIB_LOCATION ||= ONE_LOCATION + '/lib'
|
||||||
PACKET_LOCATION ||= ONE_LOCATION + '/lib/ruby/vendors/packethost/lib'
|
EQUINIX_LOCATION ||= ONE_LOCATION + '/lib/ruby/vendors/packethost/lib'
|
||||||
RUBY_LIB_LOCATION ||= ONE_LOCATION + '/lib/ruby'
|
RUBY_LIB_LOCATION ||= ONE_LOCATION + '/lib/ruby'
|
||||||
GEMS_LOCATION ||= ONE_LOCATION + '/share/gems'
|
GEMS_LOCATION ||= ONE_LOCATION + '/share/gems'
|
||||||
end
|
end
|
||||||
@ -65,7 +65,7 @@ if File.directory?(GEMS_LOCATION)
|
|||||||
end
|
end
|
||||||
# %%RUBYGEMS_SETUP_END%%
|
# %%RUBYGEMS_SETUP_END%%
|
||||||
|
|
||||||
$LOAD_PATH << PACKET_LOCATION
|
$LOAD_PATH << EQUINIX_LOCATION
|
||||||
$LOAD_PATH << RUBY_LIB_LOCATION
|
$LOAD_PATH << RUBY_LIB_LOCATION
|
||||||
$LOAD_PATH << LIB_LOCATION + '/oneprovision/lib'
|
$LOAD_PATH << LIB_LOCATION + '/oneprovision/lib'
|
||||||
|
|
||||||
@ -102,19 +102,19 @@ begin
|
|||||||
pk_token = connect['token']
|
pk_token = connect['token']
|
||||||
|
|
||||||
# --------------------------------------------------------------------------
|
# --------------------------------------------------------------------------
|
||||||
# Connect to Packet and delete the IP
|
# Connect to Equinix and delete the IP
|
||||||
# --------------------------------------------------------------------------
|
# --------------------------------------------------------------------------
|
||||||
packet = Packet::Client.new
|
equinix = Packet::Client.new
|
||||||
packet.auth_token = pk_token
|
equinix.auth_token = pk_token
|
||||||
|
|
||||||
packet_id = data.xpath('//AR/PACKET_IP_ID').text.to_s
|
equinix_id = data.xpath('//AR/EQUINIX_IP_ID').text.to_s
|
||||||
|
|
||||||
if packet_id.empty?
|
if equinix_id.empty?
|
||||||
STDERR.puts 'Missing packet range ID'
|
STDERR.puts 'Missing Equinix range ID'
|
||||||
exit(-1)
|
exit(-1)
|
||||||
end
|
end
|
||||||
|
|
||||||
packet.delete_ip(packet_id)
|
equinxi.delete_ip(equinix_id)
|
||||||
rescue StandardError => e
|
rescue StandardError => e
|
||||||
STDERR.puts e.to_s
|
STDERR.puts e.to_s
|
||||||
exit(-1)
|
exit(-1)
|
@ -41,7 +41,7 @@
|
|||||||
group: oneadmin
|
group: oneadmin
|
||||||
mode: '0640'
|
mode: '0640'
|
||||||
|
|
||||||
- name: /etc/one/packet_driver.default
|
- name: /etc/one/equinix_driver.default
|
||||||
class: Simple
|
class: Simple
|
||||||
owner: root
|
owner: root
|
||||||
group: oneadmin
|
group: oneadmin
|
||||||
|
@ -336,7 +336,7 @@ module OneProvision
|
|||||||
|
|
||||||
# Generate "ansible.cfg" file
|
# Generate "ansible.cfg" file
|
||||||
# TODO: what if private_key isn't filename, but content
|
# TODO: what if private_key isn't filename, but content
|
||||||
# TODO: store private key / packet
|
# TODO: store private key / equinix
|
||||||
# credentials securely in the ONE
|
# credentials securely in the ONE
|
||||||
roles = "#{ANSIBLE_LOCATION}/roles"
|
roles = "#{ANSIBLE_LOCATION}/roles"
|
||||||
|
|
||||||
|
@ -19,8 +19,8 @@ require 'terraform/terraform'
|
|||||||
# Module OneProvision
|
# Module OneProvision
|
||||||
module OneProvision
|
module OneProvision
|
||||||
|
|
||||||
# Packet Terraform Provider
|
# Equinix Terraform Provider
|
||||||
class Packet < Terraform
|
class Equinix < Terraform
|
||||||
|
|
||||||
NAME = Terraform.append_provider(__FILE__, name)
|
NAME = Terraform.append_provider(__FILE__, name)
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
#resource "packet_volume" "device_<%= obj['ID'] %>" {
|
#resource "packet_volume" "device_<%= obj['ID'] %>" {
|
||||||
# description = "<%= obj['ID'] %>_volume"
|
# description = "<%= obj['ID'] %>_volume"
|
||||||
# facility = "<%= provision['FACILITY'] %>"
|
# facility = "<%= provision['FACILITY'] %>"
|
||||||
# project_id = "<%= provision['PACKET_PROJECT'] %>"
|
# project_id = "<%= provision['PROJECT'] %>"
|
||||||
# plan = "<%= provision['PLAN'] %>"
|
# plan = "<%= provision['PLAN'] %>"
|
||||||
# size = "<%= obj['TOTAL_MB'] %>"
|
# size = "<%= obj['TOTAL_MB'] %>"
|
||||||
# billing_cycle = "hourly"
|
# billing_cycle = "hourly"
|
@ -49,7 +49,7 @@ end
|
|||||||
$LOAD_PATH << File.dirname(__FILE__)
|
$LOAD_PATH << File.dirname(__FILE__)
|
||||||
$LOAD_PATH << RUBY_LIB_LOCATION
|
$LOAD_PATH << RUBY_LIB_LOCATION
|
||||||
|
|
||||||
require 'packet_driver'
|
require 'equinix_driver'
|
||||||
require 'opennebula'
|
require 'opennebula'
|
||||||
|
|
||||||
deploy_id = ARGV[0]
|
deploy_id = ARGV[0]
|
||||||
@ -61,8 +61,8 @@ begin
|
|||||||
vm = OpenNebula::VirtualMachine.new_with_id(vm_id, one)
|
vm = OpenNebula::VirtualMachine.new_with_id(vm_id, one)
|
||||||
vm.info
|
vm.info
|
||||||
|
|
||||||
packet_drv = PacketDriver.new(host)
|
equinix_drv = EquinixDriver.new(host)
|
||||||
packet_drv.cancel(deploy_id, vm.lcm_state_str)
|
equinix_drv.cancel(deploy_id, vm.lcm_state_str)
|
||||||
|
|
||||||
rescue Exception => e
|
rescue Exception => e
|
||||||
STDERR.puts <<EOT
|
STDERR.puts <<EOT
|
@ -49,7 +49,7 @@ end
|
|||||||
$LOAD_PATH << File.dirname(__FILE__)
|
$LOAD_PATH << File.dirname(__FILE__)
|
||||||
$LOAD_PATH << RUBY_LIB_LOCATION
|
$LOAD_PATH << RUBY_LIB_LOCATION
|
||||||
|
|
||||||
require 'packet_driver'
|
require 'equinix_driver'
|
||||||
require 'opennebula'
|
require 'opennebula'
|
||||||
|
|
||||||
dfile = ARGV[0]
|
dfile = ARGV[0]
|
||||||
@ -62,13 +62,13 @@ begin
|
|||||||
vm = OpenNebula::VirtualMachine.new_with_id(id, OpenNebula::Client.new)
|
vm = OpenNebula::VirtualMachine.new_with_id(id, OpenNebula::Client.new)
|
||||||
vm.info
|
vm.info
|
||||||
|
|
||||||
packet_drv = PacketDriver.new(host)
|
equinix_drv = EquinixDriver.new(host)
|
||||||
text = File.read(dfile)
|
text = File.read(dfile)
|
||||||
puts packet_drv.deploy_vm(id, host, text, vm.lcm_state_str, vm.deploy_id)
|
puts equinix_drv.deploy_vm(id, host, text, vm.lcm_state_str, vm.deploy_id)
|
||||||
|
|
||||||
rescue Exception => e
|
rescue Exception => e
|
||||||
STDERR.puts <<EOT
|
STDERR.puts <<EOT
|
||||||
Deploy of VM #{id} on Packet host #{host} with #{dfile} failed due to "#{e.message}"
|
Deploy of VM #{id} on Equinix host #{host} with #{dfile} failed due to "#{e.message}"
|
||||||
#{e.backtrace}"
|
#{e.backtrace}"
|
||||||
EOT
|
EOT
|
||||||
|
|
@ -20,15 +20,15 @@ ONE_LOCATION ||= ENV['ONE_LOCATION'] unless defined? ONE_LOCATION
|
|||||||
|
|
||||||
if !ONE_LOCATION
|
if !ONE_LOCATION
|
||||||
GEMS_LOCATION ||= '/usr/share/one/gems'
|
GEMS_LOCATION ||= '/usr/share/one/gems'
|
||||||
PACKET_LOCATION ||= '/usr/lib/one/ruby/vendors/packethost/lib'
|
EQUINIX_LOCATION ||= '/usr/lib/one/ruby/vendors/packethost/lib'
|
||||||
VAR_LOCATION ||= '/var/lib/one/'
|
VAR_LOCATION ||= '/var/lib/one/'
|
||||||
else
|
else
|
||||||
GEMS_LOCATION ||= ONE_LOCATION + '/share/gems'
|
GEMS_LOCATION ||= ONE_LOCATION + '/share/gems'
|
||||||
PACKET_LOCATION ||= ONE_LOCATION + '/lib/ruby/vendors/packethost/lib'
|
EQUINIX_LOCATION ||= ONE_LOCATION + '/lib/ruby/vendors/packethost/lib'
|
||||||
VAR_LOCATION ||= ONE_LOCATION + '/var/'
|
VAR_LOCATION ||= ONE_LOCATION + '/var/'
|
||||||
end
|
end
|
||||||
|
|
||||||
PACKET_DATABASE_PATH = "#{VAR_LOCATION}/remotes/im/packet.d/packet-cache.db"
|
EQUINIX_DATABASE_PATH = "#{VAR_LOCATION}/remotes/im/equinix.d/equinix-cache.db"
|
||||||
|
|
||||||
# %%RUBYGEMS_SETUP_BEGIN%%
|
# %%RUBYGEMS_SETUP_BEGIN%%
|
||||||
if File.directory?(GEMS_LOCATION)
|
if File.directory?(GEMS_LOCATION)
|
||||||
@ -50,7 +50,7 @@ if File.directory?(GEMS_LOCATION)
|
|||||||
end
|
end
|
||||||
# %%RUBYGEMS_SETUP_END%%
|
# %%RUBYGEMS_SETUP_END%%
|
||||||
|
|
||||||
$LOAD_PATH << PACKET_LOCATION
|
$LOAD_PATH << EQUINIX_LOCATION
|
||||||
|
|
||||||
require 'packet'
|
require 'packet'
|
||||||
require 'VirtualMachineDriver'
|
require 'VirtualMachineDriver'
|
||||||
@ -60,17 +60,17 @@ require 'opennebula'
|
|||||||
|
|
||||||
### Exceptions
|
### Exceptions
|
||||||
|
|
||||||
class PacketDriverTimeout < RuntimeError
|
class EquinixDriverTimeout < RuntimeError
|
||||||
end
|
end
|
||||||
|
|
||||||
class PacketDriverDeviceNotFound < RuntimeError
|
class EquinixDriverDeviceNotFound < RuntimeError
|
||||||
end
|
end
|
||||||
|
|
||||||
class PacketDriverInvalidDeviceState < RuntimeError
|
class EquinixDriverInvalidDeviceState < RuntimeError
|
||||||
end
|
end
|
||||||
|
|
||||||
### Packet driver
|
### Equinix driver
|
||||||
class PacketDriver
|
class EquinixDriver
|
||||||
|
|
||||||
include PublicCloudDriver
|
include PublicCloudDriver
|
||||||
|
|
||||||
@ -105,8 +105,8 @@ class PacketDriver
|
|||||||
|
|
||||||
def initialize(host, id = nil, one = OpenNebula::Client.new)
|
def initialize(host, id = nil, one = OpenNebula::Client.new)
|
||||||
@one = one
|
@one = one
|
||||||
@hypervisor = 'packet'
|
@hypervisor = 'equinix'
|
||||||
@packet = Packet::Client.new
|
@equinix = Packet::Client.new
|
||||||
|
|
||||||
host = host['NAME'] unless host.is_a?(String)
|
host = host['NAME'] unless host.is_a?(String)
|
||||||
|
|
||||||
@ -114,9 +114,9 @@ class PacketDriver
|
|||||||
@xmlhost = host_info(host, id)
|
@xmlhost = host_info(host, id)
|
||||||
|
|
||||||
@globals = get_globals(@xmlhost)
|
@globals = get_globals(@xmlhost)
|
||||||
@packet.auth_token = @globals['PACKET_TOKEN']
|
@equinix.auth_token = @globals['EQUINIX_TOKEN']
|
||||||
|
|
||||||
@db = InstanceCache.new(PACKET_DATABASE_PATH)
|
@db = InstanceCache.new(EQUINIX_DATABASE_PATH)
|
||||||
end
|
end
|
||||||
|
|
||||||
def deploy_vm(_id, _host, xml_text, lcm_state, deploy_id)
|
def deploy_vm(_id, _host, xml_text, lcm_state, deploy_id)
|
||||||
@ -132,11 +132,11 @@ class PacketDriver
|
|||||||
device = xobj2device(xvm, 'USER_TEMPLATE/PUBLIC_CLOUD',
|
device = xobj2device(xvm, 'USER_TEMPLATE/PUBLIC_CLOUD',
|
||||||
'TEMPLATE/CONTEXT')
|
'TEMPLATE/CONTEXT')
|
||||||
device.tags += ['OpenNebula', "ONE_ID=#{xvm['ID']}"]
|
device.tags += ['OpenNebula', "ONE_ID=#{xvm['ID']}"]
|
||||||
@packet.create_device(device)
|
@equinix.create_device(device)
|
||||||
|
|
||||||
begin
|
begin
|
||||||
wait_state(:active, device.id)
|
wait_state(:active, device.id)
|
||||||
rescue PacketDriverTimeout
|
rescue EquinixDriverTimeout
|
||||||
nil
|
nil
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -218,10 +218,10 @@ class PacketDriver
|
|||||||
tx = 0
|
tx = 0
|
||||||
|
|
||||||
begin
|
begin
|
||||||
# @packet.get("devices/#{device.id}/bandwidth"
|
# @equinix.get("devices/#{device.id}/bandwidth"
|
||||||
# {'from'=>0, 'until'=>1523889200}).body
|
# {'from'=>0, 'until'=>1523889200}).body
|
||||||
path = "devices/#{device.id}/bandwidth"
|
path = "devices/#{device.id}/bandwidth"
|
||||||
@packet.get(path).body['bandwidth'].map do |bw|
|
@equinix.get(path).body['bandwidth'].map do |bw|
|
||||||
sum = 0
|
sum = 0
|
||||||
|
|
||||||
bw['datapoints'].each do |data, _time|
|
bw['datapoints'].each do |data, _time|
|
||||||
@ -391,10 +391,10 @@ class PacketDriver
|
|||||||
conn_opts = {}
|
conn_opts = {}
|
||||||
|
|
||||||
begin
|
begin
|
||||||
conn_opts['PACKET_TOKEN'] = xhost['TEMPLATE/PACKET_TOKEN']
|
conn_opts['EQUINIX_TOKEN'] = xhost['TEMPLATE/EQUINIX_TOKEN']
|
||||||
conn_opts['PROJECT'] = xhost['TEMPLATE/PACKET_PROJECT']
|
conn_opts['PROJECT'] = xhost['TEMPLATE/EQUINIX_PROJECT']
|
||||||
rescue StandardError
|
rescue StandardError
|
||||||
raise "HOST: #{xhost['NAME']} must have Packet credentials"
|
raise "HOST: #{xhost['NAME']} must have Equinix credentials"
|
||||||
end
|
end
|
||||||
|
|
||||||
conn_opts
|
conn_opts
|
||||||
@ -420,10 +420,10 @@ class PacketDriver
|
|||||||
# @return [Packet::Device]
|
# @return [Packet::Device]
|
||||||
def xobj2device(xobj, xpath, xpath_context)
|
def xobj2device(xobj, xpath, xpath_context)
|
||||||
device = Packet::Device.new
|
device = Packet::Device.new
|
||||||
device.client = @packet
|
device.client = @equinix
|
||||||
|
|
||||||
DEPLOY_ATTRIBUTES.each do |packet_name, template_name|
|
DEPLOY_ATTRIBUTES.each do |equinix_name, template_name|
|
||||||
key = "@#{packet_name}".to_sym
|
key = "@#{equinix_name}".to_sym
|
||||||
val = xobj["#{xpath}/#{template_name}"]
|
val = xobj["#{xpath}/#{template_name}"]
|
||||||
|
|
||||||
if @globals[template_name]
|
if @globals[template_name]
|
||||||
@ -477,38 +477,38 @@ class PacketDriver
|
|||||||
|
|
||||||
def delete(deploy_id)
|
def delete(deploy_id)
|
||||||
device = Packet::Device.new('id' => deploy_id)
|
device = Packet::Device.new('id' => deploy_id)
|
||||||
@packet.delete_device(device)
|
@equinix.delete_device(device)
|
||||||
end
|
end
|
||||||
|
|
||||||
def power_off(deploy_id)
|
def power_off(deploy_id)
|
||||||
device = Packet::Device.new('id' => deploy_id)
|
device = Packet::Device.new('id' => deploy_id)
|
||||||
@packet.power_off_device(device)
|
@equinix.power_off_device(device)
|
||||||
end
|
end
|
||||||
|
|
||||||
def power_on(deploy_id)
|
def power_on(deploy_id)
|
||||||
device = Packet::Device.new('id' => deploy_id)
|
device = Packet::Device.new('id' => deploy_id)
|
||||||
@packet.power_on_device(device)
|
@equinix.power_on_device(device)
|
||||||
end
|
end
|
||||||
|
|
||||||
def reboot_device(deploy_id)
|
def reboot_device(deploy_id)
|
||||||
device = Packet::Device.new('id' => deploy_id)
|
device = Packet::Device.new('id' => deploy_id)
|
||||||
@packet.reboot_device(device)
|
@equinix.reboot_device(device)
|
||||||
end
|
end
|
||||||
|
|
||||||
def list_devices(project_id)
|
def list_devices(project_id)
|
||||||
@packet.list_devices(project_id)
|
@equinix.list_devices(project_id)
|
||||||
end
|
end
|
||||||
|
|
||||||
def get_device(deploy_id)
|
def get_device(deploy_id)
|
||||||
begin
|
begin
|
||||||
@packet.get_device(deploy_id)
|
@equinix.get_device(deploy_id)
|
||||||
rescue Packet::NotFound
|
rescue Packet::NotFound
|
||||||
nil
|
nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def list_projects
|
def list_projects
|
||||||
@packet.list_projects
|
@equinix.list_projects
|
||||||
end
|
end
|
||||||
|
|
||||||
# TODO: configuration state_wait_timeout
|
# TODO: configuration state_wait_timeout
|
||||||
@ -527,12 +527,12 @@ class PacketDriver
|
|||||||
if device.nil?
|
if device.nil?
|
||||||
return if state == :done
|
return if state == :done
|
||||||
|
|
||||||
raise PacketDriverDeviceNotFound,
|
raise EquinixDriverDeviceNotFound,
|
||||||
"Device with #{deploy_id} not found"
|
"Device with #{deploy_id} not found"
|
||||||
end
|
end
|
||||||
|
|
||||||
if device.state == :failed
|
if device.state == :failed
|
||||||
raise PacketDriverInvalidDeviceState,
|
raise EquinixDriverInvalidDeviceState,
|
||||||
"Invalid device state #{device.state}"
|
"Invalid device state #{device.state}"
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -543,7 +543,7 @@ class PacketDriver
|
|||||||
break if (Time.now - t_s) > state_change_timeout
|
break if (Time.now - t_s) > state_change_timeout
|
||||||
end
|
end
|
||||||
|
|
||||||
raise PacketDriverTimeout, "Wait for host state '#{state}' timed out"
|
raise EquinixDriverTimeout, "Wait for host state '#{state}' timed out"
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
@ -555,9 +555,9 @@ end
|
|||||||
module DomainList
|
module DomainList
|
||||||
|
|
||||||
def self.state_info(name, id)
|
def self.state_info(name, id)
|
||||||
packet = PacketDriver.new(name, id)
|
equinix = EquinixDriver.new(name, id)
|
||||||
|
|
||||||
vms = packet.retreive_vms_data
|
vms = equinix.retreive_vms_data
|
||||||
|
|
||||||
info = {}
|
info = {}
|
||||||
vms.each do |vm|
|
vms.each do |vm|
|
||||||
@ -565,7 +565,7 @@ module DomainList
|
|||||||
:uuid => vm[:uuid],
|
:uuid => vm[:uuid],
|
||||||
:name => vm[:name],
|
:name => vm[:name],
|
||||||
:state => vm[:state],
|
:state => vm[:state],
|
||||||
:hyperv => 'packet' }
|
:hyperv => 'equinix' }
|
||||||
end
|
end
|
||||||
|
|
||||||
info
|
info
|
@ -49,7 +49,7 @@ end
|
|||||||
$LOAD_PATH << RUBY_LIB_LOCATION
|
$LOAD_PATH << RUBY_LIB_LOCATION
|
||||||
$LOAD_PATH << File.dirname(__FILE__)
|
$LOAD_PATH << File.dirname(__FILE__)
|
||||||
|
|
||||||
require 'packet_driver'
|
require 'equinix_driver'
|
||||||
require 'opennebula'
|
require 'opennebula'
|
||||||
|
|
||||||
deploy_id = ARGV[0]
|
deploy_id = ARGV[0]
|
||||||
@ -57,12 +57,12 @@ host = ARGV[1]
|
|||||||
id = ARGV[2]
|
id = ARGV[2]
|
||||||
|
|
||||||
begin
|
begin
|
||||||
packet_drv = PacketDriver.new(host)
|
equinix_drv = EquinixDriver.new(host)
|
||||||
packet_drv.poll(deploy_id)
|
equinix_drv.poll(deploy_id)
|
||||||
|
|
||||||
rescue Exception => e
|
rescue Exception => e
|
||||||
STDERR.puts <<EOT
|
STDERR.puts <<EOT
|
||||||
Cannot poll info for VM #{id} on Packet host #{host} due to "#{e.message}"
|
Cannot poll info for VM #{id} on Equinix host #{host} due to "#{e.message}"
|
||||||
#{e.backtrace}"
|
#{e.backtrace}"
|
||||||
EOT
|
EOT
|
||||||
|
|
@ -49,7 +49,7 @@ end
|
|||||||
$LOAD_PATH << File.dirname(__FILE__)
|
$LOAD_PATH << File.dirname(__FILE__)
|
||||||
$LOAD_PATH << RUBY_LIB_LOCATION
|
$LOAD_PATH << RUBY_LIB_LOCATION
|
||||||
|
|
||||||
require 'packet_driver'
|
require 'equinix_driver'
|
||||||
require 'opennebula'
|
require 'opennebula'
|
||||||
|
|
||||||
deploy_id = ARGV[0]
|
deploy_id = ARGV[0]
|
||||||
@ -57,12 +57,12 @@ host = ARGV[1]
|
|||||||
vm_id = ARGV[2]
|
vm_id = ARGV[2]
|
||||||
|
|
||||||
begin
|
begin
|
||||||
packet_drv = PacketDriver.new(host)
|
equinix_drv = EquinixDriver.new(host)
|
||||||
packet_drv.reboot(deploy_id)
|
equinix_drv.reboot(deploy_id)
|
||||||
|
|
||||||
rescue Exception => e
|
rescue Exception => e
|
||||||
STDERR.puts <<EOT
|
STDERR.puts <<EOT
|
||||||
Reboot of VM #{vm_id} on Packet host #{host} failed due to "#{e.message}"
|
Reboot of VM #{vm_id} on Equinix host #{host} failed due to "#{e.message}"
|
||||||
#{e.backtrace}"
|
#{e.backtrace}"
|
||||||
EOT
|
EOT
|
||||||
|
|
@ -49,7 +49,7 @@ end
|
|||||||
$LOAD_PATH << File.dirname(__FILE__)
|
$LOAD_PATH << File.dirname(__FILE__)
|
||||||
$LOAD_PATH << RUBY_LIB_LOCATION
|
$LOAD_PATH << RUBY_LIB_LOCATION
|
||||||
|
|
||||||
require 'packet_driver'
|
require 'equinix_driver'
|
||||||
require 'opennebula'
|
require 'opennebula'
|
||||||
|
|
||||||
deploy_id = ARGV[0]
|
deploy_id = ARGV[0]
|
||||||
@ -57,12 +57,12 @@ host = ARGV[1]
|
|||||||
vm_id = ARGV[2]
|
vm_id = ARGV[2]
|
||||||
|
|
||||||
begin
|
begin
|
||||||
packet_drv = PacketDriver.new(host)
|
equinix_drv = EquinixDriver.new(host)
|
||||||
packet_drv.reset(deploy_id)
|
equinix_drv.reset(deploy_id)
|
||||||
|
|
||||||
rescue Exception => e
|
rescue Exception => e
|
||||||
STDERR.puts <<EOT
|
STDERR.puts <<EOT
|
||||||
Reset of VM #{vm_id} on Packet host #{host} failed due to "#{e.message}"
|
Reset of VM #{vm_id} on Equinix host #{host} failed due to "#{e.message}"
|
||||||
#{e.backtrace}"
|
#{e.backtrace}"
|
||||||
EOT
|
EOT
|
||||||
|
|
@ -49,7 +49,7 @@ end
|
|||||||
$LOAD_PATH << RUBY_LIB_LOCATION
|
$LOAD_PATH << RUBY_LIB_LOCATION
|
||||||
$LOAD_PATH << File.dirname(__FILE__)
|
$LOAD_PATH << File.dirname(__FILE__)
|
||||||
|
|
||||||
require 'packet_driver'
|
require 'equinix_driver'
|
||||||
require 'opennebula'
|
require 'opennebula'
|
||||||
|
|
||||||
deploy_id = ARGV[0]
|
deploy_id = ARGV[0]
|
||||||
@ -61,12 +61,12 @@ begin
|
|||||||
vm = OpenNebula::VirtualMachine.new_with_id(vm_id, one)
|
vm = OpenNebula::VirtualMachine.new_with_id(vm_id, one)
|
||||||
vm.info
|
vm.info
|
||||||
|
|
||||||
packet_drv = PacketDriver.new(host)
|
equinix_drv = EquinixDriver.new(host)
|
||||||
packet_drv.shutdown(deploy_id, vm.lcm_state_str)
|
equinix_drv.shutdown(deploy_id, vm.lcm_state_str)
|
||||||
|
|
||||||
rescue Exception => e
|
rescue Exception => e
|
||||||
STDERR.puts <<EOT
|
STDERR.puts <<EOT
|
||||||
Shutdown of VM #{vm_id} on Packet host #{host} failed due to "#{e.message}"
|
Shutdown of VM #{vm_id} on Equinix host #{host} failed due to "#{e.message}"
|
||||||
#{e.backtrace}"
|
#{e.backtrace}"
|
||||||
EOT
|
EOT
|
||||||
|
|
@ -181,15 +181,15 @@ class ElasticDriver < VNMMAD::VNMDriver
|
|||||||
|
|
||||||
# Factory method to create a VNM provider for the host provision
|
# Factory method to create a VNM provider for the host provision
|
||||||
# @param host [OpenNebula::Host]
|
# @param host [OpenNebula::Host]
|
||||||
# @return [AWSProvider, PacketProvider, nil] nil
|
# @return [AWSProvider, EquinixProvider, nil] nil
|
||||||
def self.provider(provider, host)
|
def self.provider(provider, host)
|
||||||
case provider.body['provider']
|
case provider.body['provider']
|
||||||
when 'aws'
|
when 'aws'
|
||||||
require 'aws_vnm'
|
require 'aws_vnm'
|
||||||
AWSProvider.new(provider, host)
|
AWSProvider.new(provider, host)
|
||||||
when 'packet'
|
when 'equinix'
|
||||||
require 'packet_vnm'
|
require 'equinix_vnm'
|
||||||
PacketProvider.new(provider, host)
|
EquinixProvider.new(provider, host)
|
||||||
when 'vultr_virtual', 'vultr_metal'
|
when 'vultr_virtual', 'vultr_metal'
|
||||||
require 'vultr_vnm'
|
require 'vultr_vnm'
|
||||||
VultrProvider.new(provider, host)
|
VultrProvider.new(provider, host)
|
||||||
|
@ -20,12 +20,12 @@ if !ONE_LOCATION
|
|||||||
LIB_LOCATION ||= '/usr/lib/one'
|
LIB_LOCATION ||= '/usr/lib/one'
|
||||||
RUBY_LIB_LOCATION ||= '/usr/lib/one/ruby'
|
RUBY_LIB_LOCATION ||= '/usr/lib/one/ruby'
|
||||||
GEMS_LOCATION ||= '/usr/share/one/gems'
|
GEMS_LOCATION ||= '/usr/share/one/gems'
|
||||||
PACKET_LOCATION ||= '/usr/lib/one/ruby/vendors/packethost/lib'
|
EQUINIX_LOCATION ||= '/usr/lib/one/ruby/vendors/packethost/lib'
|
||||||
else
|
else
|
||||||
LIB_LOCATION ||= ONE_LOCATION + '/lib'
|
LIB_LOCATION ||= ONE_LOCATION + '/lib'
|
||||||
RUBY_LIB_LOCATION ||= ONE_LOCATION + '/lib/ruby'
|
RUBY_LIB_LOCATION ||= ONE_LOCATION + '/lib/ruby'
|
||||||
GEMS_LOCATION ||= ONE_LOCATION + '/share/gems'
|
GEMS_LOCATION ||= ONE_LOCATION + '/share/gems'
|
||||||
PACKET_LOCATION ||= ONE_LOCATION + '/lib/ruby/vendors/packethost/lib'
|
EQUINIX_LOCATION ||= ONE_LOCATION + '/lib/ruby/vendors/packethost/lib'
|
||||||
end
|
end
|
||||||
|
|
||||||
# %%RUBYGEMS_SETUP_BEGIN%%
|
# %%RUBYGEMS_SETUP_BEGIN%%
|
||||||
@ -49,12 +49,12 @@ end
|
|||||||
# %%RUBYGEMS_SETUP_END%%
|
# %%RUBYGEMS_SETUP_END%%
|
||||||
|
|
||||||
$LOAD_PATH << RUBY_LIB_LOCATION
|
$LOAD_PATH << RUBY_LIB_LOCATION
|
||||||
$LOAD_PATH << PACKET_LOCATION
|
$LOAD_PATH << EQUINIX_LOCATION
|
||||||
|
|
||||||
require 'packet'
|
require 'packet'
|
||||||
|
|
||||||
# Class covering Packet/Equinix functionality for Elastic driver
|
# Class covering Equinix functionality for Elastic driver
|
||||||
class PacketProvider
|
class EquinixProvider
|
||||||
|
|
||||||
def initialize(provider, host)
|
def initialize(provider, host)
|
||||||
connect = provider.body['connection']
|
connect = provider.body['connection']
|
Loading…
Reference in New Issue
Block a user