Deploying Hypersocket VM in Google Compute Engine

Pre-requisite

Find and download the Google Compute Engine VM image from our website for the product you want to install (recommended to ensure you get the latest version. We have a generic installer to cover all products/features), or get it from this direct link here: https://s3-eu-west-1.amazonaws.com/hypersocket-one/2.0.5-3110/hypersocket-one-gce-2.0.5-3110.tar.gz

 

Uploading the virtual image

Log on to your Google Cloud Platform console at https://console.cloud.google.com.

Using the menu at the top left navigate to Storage and click on it.

 

 

Click on Create Bucket if you don't already have a bucket to store your files, then give it a name and location. Click Create to create the bucket.

 

Click on the newly created bucket to enter it, then click Upload Files, then select your local copy of the image and click Open. The upload to Google Storage then starts.

 

Wait for this to finish, then using the menu at the top left click on Compute Engine.

Click on Images on the left hand side, then click Create Image at the top. Give the image a name and optionally a family and description.

Click the Source dropdown and select Cloud Storage file.

Click Browse next to Cloud Storage file, then navigate to your storage bucket and select the image you uploaded previously. Click Select.

 

Click Create to create the image. Note that this can take a few minutes.

 


Creating the VM

Click on VM instances on the left hand side.

Click on Create Instance. Give the instance a name, set the the zone you want it in and set the machine type.

In the Boot disk section, click Change.

 

Click on the Custom images column, then select the image just created. Alter the boot disk type and size if required (the defaults are generally okay). Click Select.

 

In the firewall section, tick Allow HTTP traffic (optional) and Allow HTTPS traffic (required)

If you want to add your own SSH keys to this instance, you can click the Management, disk, networking, SSH keys link and do this now - otherwise this instance will use project wide SSH keys for access. 

 

Click Create to complete the VM creation.

Your VM should now be visible in the instance list.


Connecting to your VM

 

In the instance list, you can see the IP address of your new VM.

 

Web UI

You should be able to use a web browser to connect to this machine using https://<ipaddress>.

As this is the first time you have accessed the server, it should display the Setup Wizard. Follow this wizard to complete the initial setup of the server.

 

Once the wizard has completed, you can now log on to the server and start to configure your users and resources.

 

SSH access

You can click on the SSH action on the right hand side, or the 3 dots menu then Open in browser window to get a web based SSH session.

Alternatively you can connect with a normal SSH client.
If you wish to do this, then you must generate a new SSH key-pair and apply the public key to your project. More information on this can be found here.

When you have added the public key to the Metadata page as per the link above you can configure your SSH client.

Google Cloud instances only accept key authentication so we will need the private key you generated above.

For this example, we will use PuTTY for Windows.

We first need to convert the private key into one that PuTTY can use. For this, we run the program puttygen.

Click Load, change the filename dropdown so that it reads All Files (*.*) then find and select the private key file (.pem file) that you created.

Optional (but recommended): Enter a key passphrase and confirm.

Now click Save private key and save the resulting .ppk file somewhere safe.

 

Start PuTTY and enter the hostname or ip for the VM.

On the left side, expand Connection->SSH and click on Auth. Next to Private key file for authentication, click on Browse and select the ppk file already saved above.

 

Click on Open to connect to the SSH session.

When you are prompted for a username, you need to enter your google username (Tip: this username is displayed when you uploaded the public key in the Metadata section we did previously).

 

As we had set a password on the key, the client next prompts for the key password. When we enter the password, the login completes and we have access to the server.

 

VMConsole

Hypersocket products on Virtual Machines include a UI running on the console called VMCentre. This tool can be used to change the networking, monitor the service, get access to the logs and open a support tunnel.

On a cloud based VM you do not have access to this console, so VMCentre is available to connect to via VNC. However, this VNC port is not externally accessible for security reasons but you can use an SSH client to tunnel to the console.

First however, we need to set a password for the hypersocket-one account. To do this, connect via SSH as per above and run the following command: sudo passwd hypersocket-one.

You will be prompted to type in a new password and confirm that password.

Now, back the VNC connection. On a Windows client you might want to use PuTTY to tunnel to the VNC port.

Start a new session and put in the hostname for the VM. Enter the private key details as mentioned in the SSH section above.

 

Now navigate on the left side to Connection->SSH and click on Tunnels.
In Source port, type in the port that SSH will set up on your client machine, here we will use 5900 as we don't have a VNC server on our client.

For Destination, type in localhost:5900 and click the Add button.

Click Open to start the session and log in with your SSH credentials.
Now whilst the SSH session is running, a tunnel should also be connected.

 

Using a VNC client of your choice (here we are using UltraVNC), connect to localhost::5900



You will then be prompted for a password, type in the root password and click Login.

You are now presented with the VMConsole display.

 

 

Have more questions? Submit a request

Comments