Skip to content
This repository has been archived by the owner on Jan 20, 2023. It is now read-only.

Deploy Lightwave on GCE

wfu8 edited this page May 17, 2017 · 39 revisions

Pre-requisites

  • Please follow GCE's gcloud SDK install guide @ https://cloud.google.com/sdk/downloads so that you can manipulate your GCE VM instances with gcloud CLIs including establishing SSH connections to your GCE VM instances.

With Photon OS

1. Set up firewall rules

  • For lightwave DNS we need open protocols and port: udp:53, tcp:53

  • For lightwave ldap we need open protocols and port: udp:389 tcp:389 udp:636 tcp:636

  • For lightwave sts we need open protocols and port: tcp:443

  • For lightwave rpc and others we need open protocols and port: tcp:88 tcp:88 tcp:2012 tcp:2014 tcp:2020

2. Upload PhotonOS base image built for GCE

Log in to your GCE account and create a project, i.e. named 'lightwave domain'. Go to https://vmware.github.io/photon/ to download PhotonOS image built for GCE and upload it your GCE project. This includes two steps:

  • Upload image to Google Storage: go to 'Storage' to create a bucket under your project and upload your image there.
  • Create customer image: go to 'images' and select 'create an image', where you choose 'cloud storage file' and pick the PhotonOs image you upload previously.

3. Launch a PhotonOS instance

Browse to 'Compute Engine' -> 'VM instances' -> 'CREATE INSTANCE', from where we will set up lightwave domain with first domain controller, i.e. 'lightwave-dc01' and subsequent domain replica, i.e. 'lightwave-dc02' etc.

You should be able to choose '1G' memory, and make sure you choose 'customer image' and browse to your project and choose the PhotonOS image you uploaded in step 2. Click to enable 'http/https'.

Set the following in the startup script section

hostname $(curl --silent http://metadata.google.internal/computeMetadata/v1/instance/attributes/hostname" -H     "Metadata-Flavor: Google")

Next, click on the VM instance launched in step 3 and click 'edit' and browse to "Custom metadata" and add two properties:

hostname = FQDN of your host, for instance, "lw-dc01.photon.local' 

4. Configure your instance with the right hostname

In this section, we will login to our newly formed instance and configure the hostname correctly

  • ssh into the newly formed instance

  • sudo su

  • Update the /etc/hosts file with the following entry

    (use ifconfig to determine your instance's ip address)

    10.138.0.6 lw-dc01.lightwave.local lw-dc01

  • Verify that the instance records the short name and fqdn correctly

    $hostname lw-dc01

    $hostname -f lw-dc01.photon.local

  • Set the hostname using the following command

    $hostnamectl set-hostname lw-dc01

  • Set the nameserver to be yourself. Edit /etc/resolv.conf

    nameserver 10.138.0.6

  • Restart systemd-networkd and systemd-resolved systemctl restart systemd-networkd; systemctl restart systemd-resolved

5. Install lightwave

Connect to your VM instance, and run 'sudo su' to be root.

sudo su 
tdnf makecache
tdnf install -y commons-daemon-1.0.15-8.ph1 openjre-1.8.0.112 apache-tomcat-8.5.8 (Require a specific version of 3rd dependency will be fixed in future lightwave server release)
tdnf install -y vmware-lightwave-server-1.2.0

7. Promote your first lightwave domain controller

/opt/vmware/bin/configure-lightwave-server --domain <domain name> --password <password>

8. Deploy 2nd lightwave instance joining to lightwave domain

Repeat Step 3, 4, 5 and 6 where we install and configure another instance.

9. Promote your second lightwave domain controller

/opt/vmware/bin/configure-lightwave-server --domain <domain name>  --password <password> --server <1st_lightwave_server_fqdn>

You can choose to bring up more lightwave domain controllers in the same lightwave domain by repeating step 8 and 9 above.

With Ubuntu

Configure the firewall

Follow the photon step 1 of Photon with photon to configure the firewall

Prepare the host image using Ubuntu 17.04

Set the hostname using step 4 of Photon installation

Download Ubuntu packages for lightwave and cyrus_sasl packages from vmware bintray

Promote the host instance as a domain controlle

Clone this wiki locally