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

Deploy Lightwave on GCE

kganugapati edited this page May 17, 2017 · 2 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.
  1. With Photon OS
    1. 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**
    1. 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. 
    1. 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' 
    1. 4. Configure your instance with the right hostname
In this section, we will login to our newly formed instance and configure the hostname correctly

From the gcloud shell, ssh into the newly formed instance

    gcloud compute --project "lightwave-fu" ssh --zone "us-west1-a" "lightwave-dc01"
    
 Update the /etc/hosts file with the following entry

<ip-addr></ip-addr> <fqdn></fqdn> <short-name></short-name> (use ifconfig to determine your instance's ip address)

For example

    10.138.0.6 lw-dc01.lightwave.local lw-dc01

Verify that the instance records the short name and fqdn correctly

Run the following commands

    $hostname 
     lw-dc01
    $hostname -f
     lw-dc01.photon.local
    1. 5. Configure the host to use the first lightwave as its DNS
Open '/etc/resolve.conf' and add "nameserver 1st_lightwave_instance_ip" for instance "nameserver 10.138.0.6" at the top line. Note: the first lightwave instance will also need this entry to point to itself in order for lightwave DNS work correctly.
    • Make sure you run**
    systemctl restart systemd-networkd; systemctl restart systems-resolved

to allow network/hostname configuration take effect on your VM instance.

    1. 6. 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
    1. 7. Promote your first lightwave domain controller
    * /opt/vmware/bin/configure-lightwave-server --domain &lt;domain&gt;&lt;/domain&gt; --password &lt;password&gt;&lt;/password&gt;
    1. 8. Deploy 2nd lightwave instance joining to lightwave domain
Repeat Step 3, 4, 5 and 6 where we install and configure another instance.
    1. 9. Promote your second lightwave domain controller
    * /opt/vmware/bin/configure-lightwave-server --domain &lt;domain&gt;&lt;/domain&gt;  --password &lt;password&gt;&lt;/password&gt; --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.







  1. With Ubuntu
    1. Configure the firewall
Follow the photon step 1 of Photon with photon to configure the firewall
    1. Prepare the host image using Ubuntu 17.04
    2. Set the hostname using step 4 of Photon installation
    3. Download Ubuntu packages for lightwave and cyrus_sasl packages from vmware bintray
    4. Promote the host instance as a domain controlle
Clone this wiki locally