• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to secondary sidebar
  • Skip to footer

Ulrik Christensen

  • Press
  • Contact

Google Cloud

Autoscale your Citrix Apps and Desktops Workloads in the Cloud

November 6, 2019 by Ulrik Christensen Leave a Comment

Citrix AutoScaleEarlier, I wrote an article on the Citrix blog about Machine Creation Service on Google Cloud Platform. One of the things you also get with MCS is Autoscale.

What is Autoscale?

Autoscale allows you to scale your Citrix Apps and Desktops workloads up or down, depending on the demand from your users. Autoscale will boot up new workloads, depending on demand or on a certain schedule. This means that, when no one is working and not using any resources, it will shut down workloads. When users are coming back to work, workloads will boot up to meet the demand.

What does it mean for me?

With Autoscale, you can make sure, that you do not have unused resources in your data center or in your cloud environment. If you run your workloads in Azure, AWS or GCP, you can save a lot of money if you enable autoscale. All the workloads that are not being used, will be shut down and you will not pay those resources anymore. Next morning the workloads will boot up again and will be available for the users. You can scale-down in one region and scale-up in another region so the resources are always closest to the users.

How to use Autoscale

You can configure Autoscale by editing your Delivery Groups in Studio. Here you can set up how you want to scale your workloads. You can configure anything from scheduling to power-off delay. If you put in a “Machine cost”, you will be able to see your savings in Citrix Director. It is also possible to force a certain number of machines to run at a certain time of day to make sure that you have enough workloads running.

Citrix Delivery Group

Conclusion

If you are running your workloads in a cloud, where you are paying for time-based resource use, Autoscale is a must. It saves you a lot of money and at the same time, it also makes sure that you have enough resources for your company’s needs.

Filed Under: Citrix Apps and Desktops, Google Cloud

Redis and Memorystore as a session handler in App Engine

August 3, 2019 by Ulrik Christensen Leave a Comment

If you plan to run your web application in Google Cloud using App Engine, there was one thing that I had to solve before I could launch. That was how to share my sessions across my instances in App Engine. I created a login function based on PHP and MySQL and my user information can be used on multiple pages by using sessions. The problem is when I request something from the other instance in App Engine, the session doesn’t exist. The solution was to set up Redis and Memorystore as a session handler in App Engine in Google Cloud.

Google’s documentation suggests solving this issue with Cloud SQL. In this article, I will show you how to solve it with Redis and Memorystore. The reason why I have chosen Redis is that it works with PHP right out of the box.

Using Redis as a session handler in App Engine

One way to get around solving sessions across instances in App Engine is to install at Redis database server as a compute engine. You simply spin up a Linux instance and install Redis. Here is a guide on how to do that.

Connect to your instance via SSH and type in these commands.

sudo add-apt-repository ppa:chris-lea/redis-server
sudo apt update
sudo apt install redis-server

This will install Redis on to your Linux instance.

Test your installation by typing the following command:

redis-cli ping

This will give you a PONG response.

Now you need to allow connections to the Redis server. By default, it only accepts connection from localhost. You need to bind the IP that your web app is going to communicate with. To do that you need to modify the Redis configuration file. Type in this command to open the configuration file.

sudo vi /etc/redis/redis.conf

Look for this line.

bind localhost

Add your IP at the end so it looks like this:

bind localhost xxx.xxx.xxx.xxx

Save the file and exit.

You also need to set a password. Open the same file again and look for this line:

requirepass

Modify the line by adding your password at the end so it looks like this:

requirepass yoursupersecretpassword

Save the file and exit.

Restart the Redis service with this command:

sudo service redis-server restart

You can test your Redis installation with the following commands.

Connect to the Redis service
redis-cli -h xxx.xxx.xxx.xxx

Authenticate to the Redis Service
AUTH yoursupersecretpassword

check for keys
keys *

Right now, you do not have any keys, because you have not configured your web app to use Redis. To do that you need to do three things.

1. Create a php.ini file and put it in your web application’s root folder. In the php.ini file, you need to add the following lines:

extension=redis.so
session.save_handler = redis
session.save_path = "tcp://xxx.xxx.xxx.xxx:6379?auth=yoursupersecretpassword"

2. Create a firewall rule that allows traffic on TCP port 6379 to your Redis server.
3. Add the network, where your Redis server is located, to your app.yaml file.

You need to add this to your YAML file:

network:
   name: YOUR_NETWORK_NAME
   subnetwork_name: YOUR_SUBNET
   session_affinity: true

Using Memorystore as a session handler in App Engine

session handler in App Engine
Creating a Memorystore instance

Google Cloud comes with a session handler right out of the box. It is called Memorystore. Memorystore creates a Redis instance for you do not need to do any configuration at all. You can find the Memorystore in the menu in the Google Cloud Console under Storage. The first time you access Memorystore, the Redis API is will be enabled for you. Once that is done, you will be able to create your Redis instance.

When you create an instance, you need to configure the following:

  • Instance ID
  • Location
  • Authorized network

You also need to configure the authorized network in your YAML file for your web application. Otherwise, they won’t be able to communicate. Add this to your YAML file:

network:
   name: YOUR_NETWORK_NAME
   subnetwork_name: YOUR_SUBNET
   session_affinity: true

You also need to create a php.ini file in your web application’s root folder with the following lines:

extension=redis.so
session.save_handler = redis
session.save_path = "tcp://xxx.xxx.xxx.xxx:6379"

Put in your Memorystore instance’s IP address instead of xxx.xxx.xxx.xxx

Once that is done, you are ready to go.

Conclusion

There are two ways to deal with session handler in App Engine. The easiest way is to use the Memorystore solution in Google Cloud. It takes the least effort and it is very easy to set up and get it to work.

Filed Under: Google Cloud

Machine Creation Service for Google Cloud

May 27, 2019 by Ulrik Christensen Leave a Comment

I have been waiting for this for a while now, and it is finally here. Machine Creation Service for Google Cloud was introduced at Citrix Synergy 2019.

Machine Creation Service on Google Cloud

Citrix is all about choice

The introduction of Machine Creation Service for Google Cloud is a perfect example of choice. The customer can choose from running their workloads in Azure, Google Cloud, AWS, or any other cloud. They can even run workloads in different clouds as well. This means that you can choose a machine type in one cloud that suits a specific task and chooses another machine type in another cloud. This really shows that Citrix is all in on a choice.

What does Machine Creation Service for Google Cloud mean for me?

Machine Creation Service for Google Cloud means that it is now possible to easily spin up new workloads for Citrix Apps and Desktops. Also, it enables administrators to run a controlled rollout of new applications and updates and be able to do rollbacks if this becomes necessary.

Machine Creation Service for Google Cloud is available now

David Henshall announced that Machine Creation Service for Google Cloud is available right away. Machine Creation Service for Google Cloud will be available for Citrix Cloud customers on demand and will be rolled out in Q3 2019.

With this release, it is now easier to run your workloads in the cloud. Now, you can deliver apps and desktops, using Citrix and Google technology, in your business without investing in a single piece of hardware.

At Citrix Synergy, there was a session on Google Cloud and what to know. You can watch that session here:

Filed Under: Citrix Apps and Desktops, Google Cloud

Primary Sidebar

Search

About Me

Ulrik Christensen

Building awesome solutions in the cloud and working on how to help cancer patients.

Get the latest news

I use Grammarly when I write content for this site. Try it for free.

Free & Quick Proofreading from Grammarly!

Secondary Sidebar

Achives

  • September 2020
  • August 2020
  • July 2020
  • November 2019
  • September 2019
  • August 2019
  • May 2019
  • April 2019
  • February 2019
  • November 2018
  • October 2018
  • September 2018
  • August 2018
  • July 2018
  • June 2018
  • April 2018
  • March 2018
  • February 2018
  • December 2017
  • September 2017
  • August 2017
  • July 2017
  • June 2017
  • April 2017
  • February 2017
  • January 2017
  • December 2016
  • October 2016
  • September 2016
  • August 2016
  • July 2016
  • June 2016
  • May 2016
  • April 2016
  • March 2016

Footer

Recent Posts

  • How to choose between PVS and MCS for image management
  • Autoscale your Citrix Apps and Desktops Workloads in the Cloud
  • Is VPN more secure than a Remote Desktop solution?
  • Mouse for iPad | Unleash the potential of your iPad with Citrix X1 Mouse
  • How to renew RDS grace period on RDS hosts

About

On this website, I will share all my findings so I can find them again. Feel free to look through the blog and contact me if you have any questions by using the contact page.

Get Social

  • Facebook
  • LinkedIn
  • RSS
  • Twitter

Copyright © 2021 · Ulrik Christensen · All rights reserved.