When you execute kitchen converge to launch an EC2 instance in AWS with Chef Test Kitchen, you get the error message: >>>>> ——Exception——- >>>>>> Class: Kitchen::ActionFailed >>>>>> Message: 1 actions failed. >>>>>> Failed to complete #create action: [undefined method `version’ for nil:NilClass] on … >>>>>> ———————- >>>>>> Please see .kitchen/logs/kitchen.log for more details >>>>>> Also …
Tag Archives: cloud
CloudExceptions::CloudException – 400: VPCIdNotSpecified: No default VPC for this user
When you launch a new EC2 instance in the AWS cloud from the command line or with other cloud management platforms, you may get the error message: CloudExceptions::CloudException – 400: VPCIdNotSpecified: No default VPC for this user (RequestID: …) This can happen when the specified Subnet Id is not a valid subnet in the selected …
Create the AWS credentials file from a Chef Data Bag
When a process on a server instance needs access to an AWS account, the user who will execute the AWS CLI commands needs to be able to automatically authenticate in AWS. For automatic AWS authentication, the AWS CLI creates two files in the .aws directory: config and credentials. The location of this directory depends on the …
Continue reading “Create the AWS credentials file from a Chef Data Bag”
The Splunk Search Language (SPL)
Search Terms: see Searching in Splunk Commands: tell Splunk what we want to do with the search result Charts Computing statistics Formatting Functions: explain how we want to chart, compute and evaluate the results Arguments: variables we apply to the functions Clauses: grouping and definition of results Separator Use pipes (|) to separate the components …
Create a server image with Packer
Packer is a free, open-source application from Hashicorp. It can generate a server image based on an existing one, and configure it for your special needs. You can use the generated image when you launch a server instance in the cloud or on your local workstation. Install Packer Download Packer from https://www.packer.io/downloads.html, Unzip the downloaded ZIP …
Chef Attributes
Chef attributes are global variables that are available for every cookbook on the node. There are multiple formats to declare and use an attribute. For important notes on the syntax, please see Undefined method or attribute error in a Chef recipe. To override the value of an attribute that is defined in another cookbook, use the …
Prevent the auto-termination of stranded instances in RighScale
When you launch an instance with RightScale Self Service, and the Chef cookbook execution fails, the instance goes into “stranded” mode. By default RightScale Self Service terminates the stranded instances, so there is no way to remote into them and read log files to find the cause of the problem. To keep stranded instances running in RightScale …
Continue reading “Prevent the auto-termination of stranded instances in RighScale”
Upgrade a server on an AWS EC2 instance with minimum risk and downtime
When you need to upgrade an application on an AWS EC2 instance with minimum downtime, there are many options. Upgrade an EC2 instance Stop the application, so users don’t make more changes, Create a backup of the database (snapshot of the RDS instance), Create a backup of the server (backup image of the EC2 instance), …
Continue reading “Upgrade a server on an AWS EC2 instance with minimum risk and downtime”
Test your RightScale script without creating unnecessary revisions
There are certain functions in RightScale scripts (RightScripts) that you cannot test without launching a new instance. To test your script: Edit the Head revision of the RightScale script and save it, Attach the Head revision of the RightScale script to the Head revision of the RightScale Server Template, Select the Head revision of the …
Continue reading “Test your RightScale script without creating unnecessary revisions”
Find the AWS AMI that a RightScale server template is using
When you use RightScale to launch servers in the cloud, you want to use the same base image to test your Chef cookbooks in Test Kitchen. Packer by Hashicorp is a utility to create custom server images based on cloud images. You supply the image ID and other configuration parameters to create a new custom image. …
Continue reading “Find the AWS AMI that a RightScale server template is using”