11 software delivery problems solved by intelligence software delivery platform  Download
Select Page
Share

WARNINGRedis can be used as Spinnaker’s persistent storage source, but it is unsupported and not recommended for production use-cases because it mixes fungible, short-lived cache entries with the Pipeline and Application data that deploy all of your infrastructures. This means you will have to be extra careful when clearing your Spinnaker Redis cache.

Spinnaker stores its pipeline cache (execution history) in REDIS used as storage. The default configuration deploys a pod in the Kubernetes cluster. If the pods get restarted, all of the histories get lost.

The Redis installed by Spinnaker (either locally, or in Kubernetes) isn’t configured to be production-ready. One of the easiest ways to improve Spinnaker’s reliability at scale is to use an external Redis

Steps for Configuring Spinnaker to use the External Redis: 

  • Creating a Redis Cache instance in Azure.
  • Configure Spinnaker to Connect with External Redis.
  1. Create a Redis Cache instance in Azure:

    1. Login to your Azure console, and navigate to Azure Cache for Redis service.
    2. Create a new Redis Cache Instance.
    3. Enter the details for the new Redis cache instance (Name, Resource Group, DNS Name, Cache type, TLS Port Mode, Redis Version).

Note

  1. Choose the cache type as Standard or Premium in order that notify-keyspace-events option is editable, which supports externalizing with the Spinnaker..
  2. Manually set the configuration parameter notify-keyspace-events to gxE on your Redis instance under the Advanced Settings option. This is required for the gate to make changes to the Redis instance.
  1. Note down the Redis instance details once the creation is completed. 
    1. Get  Hostname and Port  from the Properties option
    2. Get Primary Access Key from the Access Keys option.

Basic Redis Connectivity Testing:

Now that our Redis is instance up and running we can check the connection from the local desktop.

For connecting to the Redis from local desktop use the below URL:

https://techcommunity.microsoft.com/t5/azure-paas-blog/connect-to-azure-cache-for-redis-using-ssl-port-6380-from-linux/ba-p/1186109

  1. Configure Spinnaker to Connect with External Redis:

In order to configure Spinnaker to use the external Redis we need to update the Spinnaker with the below configuration:

  1. Update Spinnaker Gate configuration (This is needed if Redis is SSL Enabled).
  2. Update Redis Override URL.
  3. Apply the changes through Halyard.

Update Spinnaker Gate Configuration

Add the below configuration in the gate-local.yml file hosted in the location ~/.hal/default/profiles/gate-local.yml of the halyard pod.

				
					redis:
  configuration:
    secure: true
				
			

Update Redis Override URL

Add the Redis Override URL with the new Redis URL in the redis.yml file present in the location ~/.hal/default/service-settings/ of the halyard pod.

				
					overrideBaseUrl: rediss://:@:6380
skipLifeCycleManagement: true
				
			

Apply the Changes through Halyard:

Once the above configurations are completed, run the below command to apply these changes to Spinnaker.

				
					hal deploy apply
				
			
Test the Configurations:
  • Once the deployment is completed, browse to the spinnaker URL and create your application.
  • Create new pipelines in the application and execute them multiple times to record the cache.
  • Check the cache in the Redis after pipeline executions and the pipeline execution history is shown which is getting stored at your Redis instance.
  • To double confirm that the new Redis Cache is storing the data, open the console of the cache instance and type keys *. You should be able to see multiple keys of the spinnaker stored in the Redis.

Conclusion:

After applying the above configuration changes to your Spinnaker deployment, your Spinnaker instance is able to connect with the external Redis deployed in Azure and store all the Spinnaker pipeline execution history in the Redis Cache.


If you want to know more about the Spinnaker or request a demonstration, please book a meeting with us.

OpsMx is a leading provider of Continuous Delivery solutions that help enterprises safely deliver software at scale and without any human intervention. We help engineering teams take the risk and manual effort out of releasing innovations at the speed of modern business. For additional information, contact us at OpsMx Support.

Gopal Jayanthi

Gopal Jayanthi has 15+ years of experience in the software field in development, configuration management, build/release, and DevOps areas. Worked at Cisco, AT&T (SBC), IBM in USA and Accenture, Bank of America, and Tech Mahindra in India. Expertise in Kubernetes, Docker, Jenkins, SDLC management, version control, change management, release management.

0 Comments

Submit a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.