Fleet Manager Virtual Networks

A virtual network allows instances to communicate with each other.

Create a new virtual network

import dataikuapi

key_id = "<my key id>"
key_secret = "<my key secret>"

# <Cloud vendor> is either AWS, Azure or GCP
client = dataikuapi.FMClient<Cloud vendor>("https://localhost", key_id, key_secret)
creator = client.new_virtual_network_creator("MyNetwork")
# set the properties of your network
...
network = creator.create()

Reference API doc

class dataikuapi.fm.virtualnetworks.FMVirtualNetwork(client, vn_data)
save()

Update this virtual network.

delete()

Delete this virtual network.

Returns

the Future object representing the deletion process

Return type

dataikuapi.fm.future.FMFuture

set_fleet_management(enable, event_server=None, deployer_management='NO_MANAGED_DEPLOYER', govern_server=None)

When enabled, all instances in this virtual network know each other and can centrally manage deployer and logs centralization

Parameters
  • enable (boolean) – Enable or not the Fleet Management

  • event_server (str) – Optional, Node name of the node that should act as the centralized event server for logs concentration. Audit logs of all design, deployer and automation nodes will automatically be sent there.

  • deployer_management (str) – Optional, Accepts: - “NO_MANAGED_DEPLOYER”: Do not manage the deployer. This is the default mode. - “CENTRAL_DEPLOYER”: Central deployer. Recommended if you have more than one design node or may have more than one design node in the future. - “EACH_DESIGN_NODE”: Deployer from design. Recommended if you have a single design node and want a simpler setup.

  • govern_server (str) – Optional, node name of the node that should act as the centralized Govern server.

set_https_strategy(https_strategy)

Set the HTTPS strategy for this virtual network

Parameters

https_strategy (dataikuapi.fm.virtualnetworks.FMHTTPSStrategy) – the strategy to set

class dataikuapi.fm.virtualnetworks.FMVirtualNetworkCreator(client, label)
with_internet_access_mode(internet_access_mode)

Set the Internet access mode

Parameters

internet_access_mode (str) – The internet access mode of the instances created in this virtual network. Accepts “YES”, “NO”, “EGRESS_ONLY”. Defaults to “YES”

with_default_values()

Set the VPC and Subnet to their default values: the vpc and subnet of the FM instance

class dataikuapi.fm.virtualnetworks.FMAWSVirtualNetwork(client, vn_data)
set_dns_strategy(assign_domain_name, aws_private_ip_zone53_id=None, aws_public_ip_zone53_id=None)

Set the DNS strategy for this virtual network

Parameters
  • assign_domain_name (boolean) – If false, don’t assign domain names, use ip_only

  • aws_private_ip_zone53_id (str) – Optional, AWS Only, the ID of the AWS Route53 Zone to use for private ip

  • aws_public_ip_zone53_id (str) – Optional, AWS Only, the ID of the AWS Route53 Zone to use for public ip

class dataikuapi.fm.virtualnetworks.FMAWSVirtualNetworkCreator(client, label)
with_vpc(aws_vpc_id, aws_subnet_id)

Setup the VPC and Subnet to be used by the virtual network

Parameters
  • aws_vpc_id (str) – ID of the VPC to use

  • aws_subnet_id (str) – ID of the subnet to use

with_auto_create_security_groups()

Automatically create the AWS Security Groups when creating this virtual network

with_aws_security_groups(*aws_security_groups)

Use pre-created AWS Security Groups

Parameters

aws_security_groups (str) – Up to 5 security group ids to assign to the instances created in this virtual network

create()

Create a new virtual network

Returns

a newly created network

Return type

dataikuapi.fm.virtualnetworks.FMAWSVirtualNetwork

class dataikuapi.fm.virtualnetworks.FMAzureVirtualNetwork(client, vn_data)
set_dns_strategy(assign_domain_name, azure_dns_zone_id=None)

Set the DNS strategy for this virtual network

Parameters
  • assign_domain_name (boolean) – If false, don’t assign domain names, use ip_only

  • azure_dns_zone_id (str) – Optional, Azure Only, the ID of the Azure DNS zone to use

class dataikuapi.fm.virtualnetworks.FMAzureVirtualNetworkCreator(client, label)
with_azure_virtual_network(azure_vn_id, azure_subnet_id)

Setup the Azure Virtual Network and Subnet to be used by the virtual network

Parameters
  • azure_vn_id (str) – Resource ID of the Azure Virtual Network to use

  • azure_subnet_id (str) – Resource ID of the subnet to use

with_auto_update_security_groups(auto_update_security_groups=True)

Auto update the security groups of the Azure Virtual Network

Parameters

auto_update_security_groups (boolean) – Optional, Auto update the subnet security group. Defaults to True

create()

Create a new virtual network

Returns

a newly created network

Return type

dataikuapi.fm.virtualnetworks.FMAzureVirtualNetwork

class dataikuapi.fm.virtualnetworks.FMGCPVirtualNetwork(client, vn_data)
set_assign_public_ip(public_ip=True)

Sets whether the instances on this network will have a publicly accessible IP

Parameters

public_ip (bool) – if False, the instances will not be accessible from outside GCP

set_location_for_created_resources(project_id=None, zone=None)

Set the location in GCP of the instances created using this virtual network

Parameters
  • project_id (str) – Optional, the project in which instances should be created. If empty string, then the project of the FM instance is used

  • zone (str) – Optional, the zone in which instances should be created. If empty string, then the zone of the FM instance is used

set_dns_strategy(assign_domain_name, private_ip_zone_id=None, public_ip_zone_id=None)

Set the DNS strategy for this virtual network

Parameters
  • assign_domain_name (boolean) – If false, don’t assign domain names, use ip_only

  • private_ip_zone_id (str) – Optional, the ID of the Cloud DNS Zone to use for private ip

  • public_ip_zone_id (str) – Optional, the ID of the Cloud DNS Zone to use for public ip

class dataikuapi.fm.virtualnetworks.FMGCPVirtualNetworkCreator(client, label)
with_vpc(project_id, network, subnetwork)

Setup the VPC which the virtual network will use

Parameters
  • project_id (str) – ID of the project in which the network is defined

  • network (str) – name of the network

  • subnetwork (str) – name of the subnetwork

with_network_tags(*network_tags)

Use network tags on the instances created in the virtual network

Parameters

network_tags (str) – network tags to assign to the instances created in this virtual network.

create()

Create the virtual network

Returns

a newly created network

Return type

dataikuapi.fm.virtualnetworks.FMGCPVirtualNetwork

class dataikuapi.fm.virtualnetworks.FMHTTPSStrategy(data, https_strategy, http_redirect=False)
static disable()

Use HTTP only

static self_signed(http_redirect)

Use self-signed certificates

Parameters

http_redirect (bool) – If true, HTTP is redirected to HTTPS. If false, HTTP is disabled. Defaults to false

static custom_cert(http_redirect)

Use a custom certificate for each instance

Parameters

http_redirect (bool) – If true, HTTP is redirected to HTTPS. If false, HTTP is disabled. Defaults to false

static lets_encrypt(contact_mail)

Use Let’s Encrypt to generate https certificates

Parameters

contact_mail (str) – The contact email provided to Let’s Encrypt