How to Use AtScale GCP with a Load Balancer

 

Getting Started 

Create a new virtual machine instance and an instance group:

 

Create a Load Balancer 

 




POST https://dev-compute.sandbox.googleapis.com/compute/beta/projects/atscale-sales-demo/regions/us-west1/healthChecks

{

  "checkIntervalSec": 5,

  "description": "",

  "healthyThreshold": 2,

  "httpHealthCheck": {

    "host": "",

    "port": 10500,

    "proxyHeader": "NONE",

    "requestPath": "/ping"

  },

  "name": "engine-health",

  "region": "projects/atscale-sales-demo/regions/us-west1",

  "timeoutSec": 5,

  "type": "HTTP",

  "unhealthyThreshold": 2

}


POST https://compute.googleapis.com/compute/v1/projects/atscale-sales-demo/regions/us-west1/backendServices

{

  "backends": [

    {

      "balancingMode": "CONNECTION",

      "failover": false,

      "group": "projects/atscale-sales-demo/zones/us-west1-a/instanceGroups/rw-cluster"

    }

  ],

  "connectionDraining": {

    "drainingTimeoutSec": 300

  },

  "failoverPolicy": {},

  "healthChecks": [

    "projects/atscale-sales-demo/regions/us-west1/healthChecks/engine-health"

  ],

  "loadBalancingScheme": "EXTERNAL",

  "logConfig": {

    "enable": false

  },

  "name": "atscale-host-loadbalancer",

  "protocol": "TCP",

  "region": "projects/atscale-sales-demo/regions/us-west1",

  "sessionAffinity": "NONE"

}


POST https://compute.googleapis.com/compute/v1/projects/atscale-sales-demo/regions/us-west1/forwardingRules

{

  "IPProtocol": "TCP",

  "backendService": "projects/atscale-sales-demo/regions/us-west1/backendServices/atscale-host-loadbalancer",

  "description": "",

  "ipVersion": "IPV4",

  "loadBalancingScheme": "EXTERNAL",

  "name": "atscale-frontend",

  "networkTier": "PREMIUM",

  "ports": [

    "10500",

    "10502",

    "11111"

  ],

  "region": "projects/atscale-sales-demo/regions/us-west1"

}

Set Up AtScale 

Get the external IP address from your load balancer. If you already have a vanity name, then verify it.

nslookup 35.197.58.168

Server: 2001:558:feed::1

Address: 2001:558:feed::1#53


Non-authoritative answer:

xxx.xxx.xxx5.in-addr.arpa name = 168.58.197.35.bc.googleusercontent.com.

 

Download and install AtScale binary. Check ulimit for atscale user.

 

Configure AtScale 

atscale@rw-atscale-host:~$ /opt/atscale/versions/2023.1.0.5837/bin/configurator.sh --first-time

2023-04-13 18:56:52: Starting configurator

Generating /opt/atscale/conf/atscale.yaml...


This will generate a basic atscale configuration using the following:


           Host: rw-atscale-host.us-west1-a.c.atscale-sales-demo.internal

Service account: atscale


Is this correct? (y/N) Y

Generating configuration for current host...

Archiving atscale config: /opt/atscale/data/config.history/atscale-20230413_185654.yaml

Generating /opt/atscale/versions/2023.1.0.5837/conf/effective.yaml...

local_hostname: rw-atscale-host.us-west1-a.c.atscale-sales-demo.internal

user_config_filename: /opt/atscale/conf/atscale.yaml

default_config_directory: /opt/atscale/versions/2023.1.0.5837/defaults

roles_directory: /opt/atscale/versions/2023.1.0.5837/bin/configurator/roles


Merging in defaults from role definitions...

Merging file: /opt/atscale/versions/2023.1.0.5837/bin/configurator/roles/servicecontrol/vars/main.yml

Merging file: /opt/atscale/versions/2023.1.0.5837/bin/configurator/roles/database/vars/main.yml

Merging file: /opt/atscale/versions/2023.1.0.5837/bin/configurator/roles/orchestrator_ui/vars/main.yml

Merging file: /opt/atscale/versions/2023.1.0.5837/bin/configurator/roles/agent/vars/main.yml

Merging file: /opt/atscale/versions/2023.1.0.5837/bin/configurator/roles/virtualization_listener/vars/main.yml

Merging file: /opt/atscale/versions/2023.1.0.5837/bin/configurator/roles/kibana/vars/main.yml

Merging file: /opt/atscale/versions/2023.1.0.5837/bin/configurator/roles/virtualization_worker/vars/main.yml

Merging file: /opt/atscale/versions/2023.1.0.5837/bin/configurator/roles/orchestrator/vars/main.yml

Merging file: /opt/atscale/versions/2023.1.0.5837/bin/configurator/roles/m3db/vars/main.yml

Merging file: /opt/atscale/versions/2023.1.0.5837/bin/configurator/roles/service_registry/vars/main.yml

Merging file: /opt/atscale/versions/2023.1.0.5837/bin/configurator/roles/datadash/vars/main.yml

Merging file: /opt/atscale/versions/2023.1.0.5837/bin/configurator/roles/message_exchange/vars/main.yml

Merging file: /opt/atscale/versions/2023.1.0.5837/bin/configurator/roles/metricsd/vars/main.yml

Merging file: /opt/atscale/versions/2023.1.0.5837/bin/configurator/roles/metadata_engine/vars/main.yml

Merging file: /opt/atscale/versions/2023.1.0.5837/bin/configurator/roles/virtualization_supervisor/vars/main.yml

Merging file: /opt/atscale/versions/2023.1.0.5837/bin/configurator/roles/ingress/vars/main.yml

Merging file: /opt/atscale/versions/2023.1.0.5837/bin/configurator/roles/supervisor/vars/main.yml

Merging file: /opt/atscale/versions/2023.1.0.5837/bin/configurator/roles/heartbeatsd/vars/main.yml

Merging file: /opt/atscale/versions/2023.1.0.5837/bin/configurator/roles/query_engine/vars/main.yml

Merging file: /opt/atscale/versions/2023.1.0.5837/bin/configurator/roles/opentelemetryd/vars/main.yml

Merging file: /opt/atscale/versions/2023.1.0.5837/bin/configurator/roles/virtualization/vars/main.yml

Merging file: /opt/atscale/versions/2023.1.0.5837/bin/configurator/roles/drivers/vars/main.yml

Merging file: /opt/atscale/versions/2023.1.0.5837/bin/configurator/roles/modeler/vars/main.yml

Merging file: /opt/atscale/versions/2023.1.0.5837/bin/configurator/roles/coordinator/vars/main.yml

Merging file: /opt/atscale/versions/2023.1.0.5837/bin/configurator/roles/engine/vars/main.yml

Merging file: /opt/atscale/versions/2023.1.0.5837/bin/configurator/roles/vault_agent/vars/main.yml

Merging file: /opt/atscale/versions/2023.1.0.5837/bin/configurator/roles/logsd/vars/main.yml

Merging file: /opt/atscale/versions/2023.1.0.5837/bin/configurator/roles/vault/vars/main.yml

Merging file: /opt/atscale/versions/2023.1.0.5837/bin/configurator/roles/message_bus/vars/main.yml

Merging file: /opt/atscale/versions/2023.1.0.5837/bin/configurator/roles/grafana/vars/main.yml

Merging file: /opt/atscale/versions/2023.1.0.5837/bin/configurator/roles/search_index/vars/main.yml

Merging file: /opt/atscale/versions/2023.1.0.5837/bin/configurator/roles/directory/vars/main.yml

Merging file: /opt/atscale/versions/2023.1.0.5837/bin/configurator/roles/egress/vars/main.yml

Merging file: /opt/atscale/versions/2023.1.0.5837/bin/configurator/roles/infraapi/vars/main.yml

Merging file: /opt/atscale/versions/2023.1.0.5837/bin/configurator/roles/data_agent/vars/main.yml


Merging in remaining defaults...

Merging file: installer.yaml


Merging global...


Evaluating deprecated attributes...


Assigning host...

Merging host override service configs...

{'coordinator': {'id': 12}}


Extracting node meta information from the hostname...


Generate installation parameters...

Applying template installer/validate.template with /opt/atscale/versions/2023.1.0.5837/conf/effective.yaml...








--- Atscale configuration -------------------------------------


Installation location ... : /opt/atscale

Service account ......... : atscale

App DNS name ........... : rw-atscale-host.us-west1-a.c.atscale-sales-demo.internal

Engine DNS name ......... : rw-atscale-host.us-west1-a.c.atscale-sales-demo.internal



--- TLS -------------------------------------------------------


Enabled ................. : False



--- Kerberos --------------------------------------------------


Enabled ................. : False



--- Hosts configuration ---------------------------------------


FQDN ................ : rw-atscale-host.us-west1-a.c.atscale-sales-demo.internal

   Coordinator Host id .............. : 12

   Services ............. : atscale, coordinator




--- Current host ----------------------------------------------


Discovered hostname ..... : rw-atscale-host.us-west1-a.c.atscale-sales-demo.internal

Found configuration ..... : Yes

Services ................ : atscale, coordinator


Ports:

  Modeler ............... : 10500

  Engine ................ : 10502

  Coordinator ........... : 10513


---------------------------------------------------------------


                          




                      


Configuration OK.

Generating installation scripts...

Applying template installer/check-tls-configuration.sh.template with /opt/atscale/versions/2023.1.0.5837/conf/effective.yaml...

Applying template installer/check-krb-configuration.sh.template with /opt/atscale/versions/2023.1.0.5837/conf/effective.yaml...

Applying template installer/check-host.sh.template with /opt/atscale/versions/2023.1.0.5837/conf/effective.yaml...

Verifying host configuration...

PING rw-atscale-host.us-west1-a.c.atscale-sales-demo.internal (10.138.15.235) 56(84) bytes of data.

64 bytes from rw-atscale-host.us-west1-a.c.atscale-sales-demo.internal (10.138.15.235): icmp_seq=1 ttl=64 time=0.014 ms


--- rw-atscale-host.us-west1-a.c.atscale-sales-demo.internal ping statistics ---

1 packets transmitted, 1 received, 0% packet loss, time 0ms

rtt min/avg/max/mdev = 0.014/0.014/0.014/0.000 ms

Hosts are reachable.

Verifying TLS configuration...

TLS is disabled, nothing to validate.

Verifying Kerberos configuration...

Kerberos is disabled, nothing to validate.

Do you wish to apply this configuration? (y/N): N

Aborting.

2023-04-13 18:57:00: Configurator finished, RET=1

 

Answer Yes first to generate a default YAML file and No afterward to update the file. 

Edit atscale.yaml:

Update the load balancer to the NLB name and engine memory. The load balancer name is 168.58.197.35.bc.googleusercontent.com.

 

Rerun the following configurator and respond with Y:

/opt/atscale/versions/2023.1.0.5837/bin/configurator.sh --first-time

Load engine_settings...

Setting: auth.scheme = http

Setting: modeler.scheme = http

Setting: agent.port = 10525

Setting: auth.host = 168.58.197.35.bc.googleusercontent.com

Setting: auth.port = 10503

Setting: modeler.host = 168.58.197.35.bc.googleusercontent.com

Setting: modeler.port = 10500

Setting: http.port = 10502

Setting: atscale.host = 168.58.197.35.bc.googleusercontent.com

Setting: cluster.zookeeper.connectionString = rw-atscale-host.us-west1-a.c.atscale-sales-demo.internal:10513

Setting: cluster.zookeeper.basePath = /atscale

Setting: cluster.zookeeper.encryptedPassword = s59446c445a6d3437553051714e5635526547566563773d3d

Setting: kerberos.client.enabled = false

Setting: kerberos.service = 

Setting: kerberos.host = 

Setting: kerberos.domain = 

Setting: kerberos.keytab = 

Setting: ssl.enabled = false

Setting: ssl.keystore.path = 

Setting: ssl.keystore.password = 

Setting: dataloader.srcDir = /opt/atscale/data/dataloader

Setting: atscale.extensions.path = /opt/atscale/extensions

Enabling engine...

engine: added process group

Waiting for engine ...........

Waited 18s.

Done.

2023-04-13 19:03:55: Configurator finished, RET=0

 

Verify a Load Balancer 

After completing the installation, update /etc/hosts to map the network load balancing name (NLB) to the localhost IP address:

root@rw-atscale-host:~# ip addr

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000

    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00

    inet 127.0.0.1/8 scope host lo

       valid_lft forever preferred_lft forever

    inet6 ::1/128 scope host 

       valid_lft forever preferred_lft forever

2: ens4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1460 qdisc mq state UP group default qlen 1000

    link/ether 42:01:0a:8a:0f:eb brd ff:ff:ff:ff:ff:ff

    altname enp0s4

    inet 10.138.15.235/32 scope global dynamic ens4

       valid_lft 2902sec preferred_lft 2902sec

    inet6 fe80::4001:aff:fe8a:feb/64 scope link 

       valid_lft forever preferred_lft forever

 

Edit /etc/hosts:

 




Connect to the AtScale URL, and add the license key:

 

Terminate a Load Balancer 

Use secure socket layer protocol to create a new load balancer; it has to be multiregional. AtScale only accepts HTTP/HTTPS when a load balancer needs to be terminated.


Update atscale.yaml and then the load balancer. Run the configurator again:

installation_location: "/opt/atscale"

service_account: "atscale"

loadbalancer_dns_name: "166.177.244.35.bc.googleusercontent.com"


tls:

  enabled: false

  certificate: "/opt/atscale/conf/server.cert"

  key: "/opt/atscale/conf/server.key"

  custom_crt:

    path: "/opt/atscale/data/security/crt/"


kerberos:

  enabled: false

  cache:

    enabled: false

    file: "/opt/atscale/conf/krb5cc_a_ct_atscale"

  keytab: "/opt/atscale/conf/atscale.keytab"

  principal: "atscale/rw-atscale-host.us-west1-a.c.atscale-sales-demo.internal@REALM"


engine:

  memory: "31G"


hosts:

  - dnsname: rw-atscale-host.us-west1-a.c.atscale-sales-demo.internal

    services:

      - atscale

      - coordinator

    override:

      coordinator:

        id: 12

external:

  engine:

     load_balancer_url: https://211.61.241.35.bc.googleusercontent.com

  apps:

     load_balancer_url: https://166.177.244.35.bc.googleusercontent.com

  sql:

     load_balancer_url: http://168.58.197.35.bc.googleusercontent.com:11111

  mdx:

     load_balancer_url: https://211.61.241.35.bc.googleusercontent.com

  modeler:

     load_balancer_url: https://166.177.244.35.bc.googleusercontent.com

 

/opt/atscale/versions/current/bin/configurator.sh --apply:

 

Load engine_settings...

Setting: auth.scheme = http

Setting: modeler.scheme = http

Setting: agent.port = 10525

Setting: auth.host = 166.177.244.35.bc.googleusercontent.com

Setting: auth.port = 10503

Setting: modeler.host = 166.177.244.35.bc.googleusercontent.com

Setting: modeler.port = 10500

Setting: http.port = 10502

Setting: atscale.host = 166.177.244.35.bc.googleusercontent.com

Setting: cluster.zookeeper.connectionString = rw-atscale-host.us-west1-a.c.atscale-sales-demo.internal:10513

Setting: cluster.zookeeper.basePath = /atscale

Setting: cluster.zookeeper.encryptedPassword = s59446c445a6d3437553051714e5635526547566563773d3d

Setting: kerberos.client.enabled = false

Setting: kerberos.service = 

Setting: kerberos.host = 

Setting: kerberos.domain = 

Setting: kerberos.keytab = 

Setting: ssl.enabled = false

Setting: ssl.keystore.path = 

Setting: ssl.keystore.password = 

Setting: dataloader.srcDir = /opt/atscale/data/dataloader

Setting: atscale.extensions.path = /opt/atscale/extensions

Enabling engine...

engine: added process group

Waiting for engine ..........

Waited 16s.

Done.

 

Was this article helpful?

0 out of 0 found this helpful