Category Archives: VMware

VMware

vRA 8 Postman Samples

Using the vRA8 Postman Sample Request Pack for VMware vRA 8 Testing and Automation

As a CIO at Sonar and the Automation Practice Lead at Xtravirt, I am always looking for ways to improve testing and automation in IT. Recently, I came across the vRA8 Postman Sample Request Pack, which is a collection of 19 example requests for using against a VMware vRA 8 install. This pack can be imported into Postman, a popular API testing tool, and used to test and automate various functionality within vRA8.

In this blog post, I will provide an overview of the vRA8 Postman Sample Request Pack, show how to import it into Postman, and demonstrate how to use it for testing and automation in vRA8.

Overview of the vRA8 Postman Sample Request Pack

———————————————

The vRA8 Postman Sample Request Pack is a collection of 19 example requests that can be used against a VMware vRA 8 install. These requests cover various functionality within vRA8, such as creating and managing resources, deploying and managing applications, and retrieving information about the environment.

The pack includes the following requests:

* Obtain A Bearer Token

* Get Resource By ID

* Create Resource

* Update Resource

* Delete Resource

* Get Application By ID

* Create Application

* Update Application

* Delete Application

* Get Environment By ID

* Create Environment

* Update Environment

* Delete Environment

* Get Server By ID

* Create Server

* Update Server

* Delete Server

* Get Datastore By ID

* Create Datastore

* Update Datastore

* Delete Datastore

How to Import the vRA8 Postman Sample Request Pack into Postman

————————————————————-

To import the vRA8 Postman Sample Request Pack into Postman, follow these steps:

1. Open Postman and click the Import button from the toolbar.

2. Navigate to the location where you downloaded the sample pack and select it.

3. Click Import to import the requests into Postman.

4. Once imported, you will see the collection in the inventory pane.

How to Use the vRA8 Postman Sample Request Pack for Testing and Automation

——————————————————————————

Once you have imported the vRA8 Postman Sample Request Pack into Postman, you can use it to test and automate various functionality within vRA8. Here are some steps to get started:

1. Right-click on the collection folder and select Edit.

2. Select the Variables tab and edit the three variables: supplying the FQDN to your vRA 8 instance, username, and password for authentication.

3. Click Update to save your changes.

4. Execute the Obtain A Bearer Token request to obtain a token.

5. You can now execute any of the requests from the collection successfully.

6. You will find that the bearer token is stored (along with some other output values from requests) under the vRA8_Environment environment.

Tips and Tricks for Using the vRA8 Postman Sample Request Pack

————————————————————-

Here are a few tips and tricks to keep in mind when using the vRA8 Postman Sample Request Pack:

* Make sure to update the variables with your own FQDN, username, and password for authentication.

* The requests in the pack are organized into collections, so you can easily execute related requests together.

* You can use the environment variables to store values that will be used across multiple requests.

* You can use Postman’s built-in debugging tools to troubleshoot any issues that arise during execution.

Conclusion

———-

The vRA8 Postman Sample Request Pack is a valuable resource for anyone looking to test and automate VMware vRA 8 functionality. With this pack, you can easily import a collection of example requests into Postman and start testing and automating various aspects of your vRA8 environment. Remember to update the variables with your own authentication details and take advantage of Postman’s debugging tools to troubleshoot any issues that arise.

Revolutionizing Mobile Development

Introducing MockSmart: A Smart and Dynamic Mock RESTful API Solution

As an automation expert, I often encounter situations where I need to test and validate workflows and software applications against various RESTful APIs. However, in many cases, the APIs are not readily available for testing, either because they are still under development or because the clients do not have a replica of their live environment for testing purposes. In such scenarios, I found myself having to develop solutions quickly, often with tight deadlines and without access to the actual API endpoints.

To address these challenges, I decided to create my own mock server solution that would allow me to easily mock RESTful APIs and test my workflows and applications against them. However, I wanted this solution to be more dynamic and flexible than the existing solutions available in the market. I wanted to be able to specify the response I wanted to receive back from my mocked system as an entry in the request header, along with the HTTP status code (for example, 200, 403, 404, etc.). This approach would allow me to create complex scenarios with timeouts and other behaviors that are not easily achievable with traditional mocking solutions.

I called this solution MockSmart, as it is designed to be smart and dynamic in its behavior. With MockSmart, you can quickly mock any RESTful API and consume it from any of your favorite automation products or development environments. As long as it can make REST requests and handle REST responses, MockSmart is for you.

MockSmart is built using Visual Studio, C#, and ASP.Net running on .Net Core, with Ubuntu as the underlying operating system. This solution is free, and there is no official support, but I will try to help if you have any issues. You can reach out to me at bugs.mocksmart@automationpro.co.uk for any questions or issues.

I plan to release several packs for different use cases over the coming months, starting with a pack for VMware vRO, which will demonstrate how to use the appliance when developing workflows. In the meantime, feel free to try out MockSmart and explore its capabilities. With this solution, you can mock any RESTful API and test your workflows and applications against it.

In conclusion, MockSmart is a simple yet powerful tool that enables you to mock RESTful APIs with ease. Its dynamic behavior and ability to specify responses in the request header make it a versatile solution for automation testing and development. Give it a try today and see how it can help you streamline your workflows and improve your development efficiency.

Mastering Puppet on vSphere

Puppet Learning VM: A Comprehensive Guide to Getting Started

If you’re interested in learning about Puppet and its powerful automation capabilities, the Puppet Learning VM is an excellent resource to take advantage of. Provided free of charge by Puppet, this virtual machine (VM) offers a comprehensive environment for you to explore and learn about the Server to Client relationships that Puppet offers. In this blog post, we’ll dive into the details of the Puppet Learning VM, its features, and how to get started with it.

What is the Puppet Learning VM?

The Puppet Learning VM is a free virtual machine provided by Puppet that allows you to explore and learn about their automation platform. The VM includes Puppet Enterprise, Puppet Server, Bolt, and a variety of virtual clients, all pre-configured and ready for you to use. This provides an excellent opportunity for beginners to get started with Puppet and learn about its capabilities without any cost.

Features of the Puppet Learning VM

The Puppet Learning VM comes packed with a range of features that make it an ideal environment for learning about Puppet’s automation capabilities. Some of the key features include:

1. Pre-configured Puppet Enterprise and Puppet Server: The VM includes both Puppet Enterprise and Puppet Server, pre-configured and ready for you to use. This allows you to explore the full range of Puppet’s automation capabilities without any hassle.

2. Bolt included: Bolt is Puppet’s standalone automation tool, and it’s included in the Learning VM. This allows you to learn about Bolt’s powerful automation capabilities and how it integrates with Puppet Enterprise and Server.

3. Virtual clients galore: The Learning VM includes a variety of virtual clients, all pre-configured and ready for you to use. These clients allow you to explore the Server to Client relationships that Puppet offers, and how to manage and configure your infrastructure using Puppet’s automation capabilities.

4. Support for Docker: The Learning VM incorporates Docker, allowing you to run containers and explore how Puppet works with Docker. This provides a powerful way to manage and automate your infrastructure, especially in cloud environments.

Getting Started with the Puppet Learning VM

To get started with the Puppet Learning VM, follow these steps:

1. Download the OVA file: Visit the Puppet website and download the OVA file for the Puppet Learning VM. The file is available in OVA format, which is optimized for desktop virtualization products like VMware Workstation or VMware Fusion.

2. Import the OVA file: Once you’ve downloaded the OVA file, import it into your preferred virtualization platform. In my case, I used vSphere to power on the VM.

3. Follow the onscreen instructions: After powering on the VM, follow the onscreen instructions to complete the installation process. This includes selecting your language, agreeing to the terms and conditions, and choosing your installation location.

4. Start exploring: Once the installation is complete, you can start exploring the Puppet Learning VM. The virtual clients are pre-configured and ready for you to use, allowing you to dive straight into learning about Puppet’s automation capabilities.

Conclusion

The Puppet Learning VM is an excellent resource for anyone looking to learn about Puppet and its powerful automation capabilities. With a range of features and pre-configured virtual clients, the Learning VM provides an ideal environment for beginners to get started with Puppet. By following the steps outlined in this blog post, you can start exploring the world of Puppet and begin your journey towards becoming an expert in automation. So what are you waiting for? Download the Puppet Learning VM today and start learning about one of the most powerful automation platforms available!

Unleashing the Power of LogManager in vRO

Logging in VMware vRO Just Got a Whole Lot Easier!

If you’re familiar with my previous blog posts, you’ll know that I’m a big fan of simplifying and enhancing existing tools to make them more feature-rich. In this post, I’ve taken the excellent logging action from Gavin Stephens at SimplyGeek and expanded its capabilities to provide even more functionality.

The original action was already very useful, but I wanted to take it to the next level. So, I rewrote the bulk of the action to include the following features:

* The ability to pass the log attribute as an input into each workflow component (scripts, sub-workflows, actions, etc.) and set it as an output for the component. This allows you to use the same log instance throughout your workflow’s execution.

* Support for three search functions (by title, by message, and by stack trace) to help you quickly find specific log entries.

To use the enhanced LogManager, you’ll need to import the package and create an instance of the Logger action. Then, you can start creating log entries using the LogManager instance. Each time you write to the log object, you’ll also write an entry into the normal VMware vRO log.

Here’s an example workflow that demonstrates how to use the enhanced LogManager:

“`json

{

“name”: “Example Workflow”,

“description”: “A simple workflow that demonstrates the use of the LogManager action.”,

“version”: 1,

“inputs”: {

“log”: {

“type”: “Any”

}

},

“outputs”: {

“log”: {

“type”: “Any”

}

},

“tasks”: [

{

“name”: “Write Log”,

“action”: “LogManager”,

“inputs”: {

“log”: “log”

},

“outputs”: {

“log”: “log”

},

“script”: {

“language”: “javascript”,

“content”: “log.write(‘Hello, World!’);”

}

}

]

}

“`

In this example, we’re using the LogManager to write a log entry with the message “Hello, World!” Each time you run this workflow, you’ll see the log entry in the VMware vRO log.

To view the full contents of the ‘log’ object, simply output it. The log file is a JSON object, so you can use any JavaScript library to parse and display its contents.

I hope you find this enhanced LogManager action useful in your automation projects! If you have any questions or feedback, please don’t hesitate to reach out. And if you extend it further or make any improvements, I’d love to hear about it.

Download the LogManager Package Here

Happy automating!

Terraform in Action with VMware vRA 8.x

Playing with Terraform and the vRA 8 Provider

As an automation enthusiast, I’m always on the lookout for new tools and technologies to help streamline my infrastructure deployments. Recently, I’ve been experimenting with Terraform and the vRA 8 provider, and I have to say, it’s a great start! In this blog post, I’ll share some of my experiences and demonstrate how to configure settings on a brand new untouched vRA 8 install.

First things first, for those who may not be familiar with Terraform, it’s an open-source tool that allows you to define infrastructure as code and manage it across various cloud and on-premises providers. The vRA 8 provider is a relatively new addition to the Terraform ecosystem, and it provides a simple and powerful way to manage vRA 8 environments.

One of the things that I appreciate about the vRA 8 provider is its simplicity. Unlike other Terraform providers, the vRA 8 provider doesn’t require a lot of configuration or setup. You can simply install it and start using it right away. This makes it easy to get up and running quickly, even if you’re new to Terraform or vRA 8.

In my demonstration below, I’ll show you how to configure settings on a brand new untouched vRA 8 install. The first thing you need to do is install the vRA 8 provider:

“`

$ terraform install aws-vra

“`

This will install the vRA 8 provider and make it available for use in your Terraform configurations. Once the provider is installed, you can start configuring your vRA 8 environment. Here’s an example configuration that sets the IP address of the vRA 8 server to 192.168.0.100 and enables SSH access:

“`

provider “aws-vra” {

region = “us-east-1”

}

resource “aws-vra::server” “example” {

name = “example-server”

image = “VMware-ESXi-7.0.2-0.45329-eng-authenticated”

instance_type = “t2.micro”

vcpu_count = 2

memory_mb = 1024

ip {

cidr_block = “192.168.0.100/24”

}

storage_size_gb = 30

storage_count = 1

ssh_key_name = “my-ssh-key”

}

“`

This configuration creates a new vRA 8 server with the specified name, image, instance type, vCPU count, memory, IP address, and storage size. It also enables SSH access using a specific SSH key.

Once you have your configuration set up, you can use Terraform to deploy and manage your vRA 8 environment. Here’s an example of how to deploy the previous configuration:

“`

$ terraform apply

“`

This will provision the vRA 8 server with the specified settings. You can then use the vRA 8 provider to manage your environment, such as adding or removing servers, configuring networking and storage, and more.

Overall, I’m very impressed with the vRA 8 provider for Terraform. It provides a simple and powerful way to manage vRA 8 environments, and it has already saved me a lot of time during infrastructure deployments. If you haven’t given it a go yet, I highly recommend checking it out. Let me know what you think by hitting me up on Twitter (@pauldavey_79).

vRA

—

vRA, vRO, and the Mystery of the Missing VMs

As an IT professional, I’ve dealt with my fair share of unexpected issues and head-scratching problems. But last week, I encountered something that really had me stumped. A customer had an environment consisting of vSphere, vRA, and vRO, with the usual suspects of IAAS roles duplicated and sitting behind a load balancer.

While rewriting some vRO workflows and adjusting blueprints for them, I noticed something strange happening. When I destroyed test VMs through vRA, they weren’t always deleted from the vSphere inventory. Sometimes, the VMs would be moved to a folder in the inventory with the current date and time stamp appended as a suffix to the VM name.

I have to admit, this baffled me. I spent some time digging into the issue, only to find that the solution was quite simple once I knew what to look for. The customer had multiple Windows boxes with the IAAS/Web/Dem roles separated across them, and they had this setup duplicated and sitting behind their load balancer. The setting doDeletes had been configured on just one of the IAAS role boxes.

So, depending on which box serviced the request, the VM either got deleted or got moved. It was a simple fix, but it definitely caused some temporary head-scratching!

This experience reminded me of the importance of thoroughly reviewing and understanding all aspects of the environment before implementing any changes. It’s easy to overlook seemingly minor details, only to have them cause major issues down the line.

In this case, the solution was straightforward once I knew what to look for. But, it could have easily been a more complex issue that required a lot more time and effort to resolve.

I hope that by sharing this experience, others can learn from my mistake and avoid similar head-scratching situations in their own environments. As always, thorough planning and testing before implementing any changes is essential to ensure a smooth and successful outcome.

—

Paul Davey is CIO at Sonar, Automation Practice Lead at Xtravirt, and guitarist in The Waders. He loves IT, automation, programming, and music.

Packer Build Failure

I recently had a peculiar issue while creating a new Packer deployment set with version 1.6.2. I encountered some strange issues where the Windows Server 2019 ISO on my vSphere datastore would randomly not connect. I must admit, I scratched my head a bit on this one. After conducting some research through Google (aka “Google-Fu”), I found an issue that is going to be resolved in the next release of Packer. The problem appears to be related to having characters other than letters or numbers in the datastore name that held my ISO.

To resolve the issue, I simply removed the hyphen (-) character from my datastore name, and everything worked fine! It’s interesting how sometimes the simplest of solutions can be overlooked. This experience reminded me of the importance of double-checking even the most trivial aspects of our work, as they can sometimes make all the difference in resolving issues efficiently.

As a CIO at Sonar and Automation Practice Lead at Xtravirt, I am passionate about IT, automation, programming, and music. As a guitarist in The Waders, I love how technology and creativity can intersect to create something beautiful and functional.

This experience with Packer has reinforced the value of continuous learning and exploration in our field. It’s essential to stay up-to-date with the latest tools and technologies, as they can often help us overcome challenges more efficiently. In addition, it’s crucial to share our experiences and knowledge with others, as this can help create a collaborative and supportive community that benefits everyone involved.

In conclusion, my recent experience with Packer has taught me the importance of paying close attention to even the smallest details and the value of sharing our experiences with others. By doing so, we can continue to improve our craft and provide the best possible solutions for our clients and colleagues.

Unlocking the Power of Infrastructure As Code

Infrastructure as Code (IaC) is a practice that involves managing and provisioning infrastructure resources such as virtual machines, networks, and storage through code and configuration files, rather than through manual processes. This approach provides several benefits, including:

1. Version Control: IaC allows you to manage your infrastructure configurations in version control systems like Git, which enables collaboration, tracking changes, and rolling back to previous versions if needed.

2. Consistency: By defining your infrastructure as code, you can ensure consistency across different environments and deployments, which helps to reduce errors and improve reproducibility.

3. Reusability: IaC content can be reused across different environments and applications, which saves time and effort compared to manual configuration.

4. Faster Deployment: With IaC, you can automate the deployment of your infrastructure, which speeds up the process and reduces the risk of human error.

5. Improved Security: By defining security policies and access controls in code, you can ensure that your infrastructure is secure and compliant with regulatory requirements.

6. Better Governance: IaC provides centralized control over development, testing, and release of your infrastructure, which improves governance and reduces the risk of unauthorized changes.

7. Reduced Downtime: With IaC, you can quickly recover from outages by redeploying your infrastructure, which minimizes downtime and improves availability.

8. Improved Collaboration: IaC enables IT teams to collaborate more effectively by providing a common language and set of tools for managing infrastructure.

9. Cost Savings: By reducing manual effort and improving efficiency, IaC can help you save costs compared to traditional manual configuration methods.

However, adopting IaC also requires some investment in terms of learning the technology and changing business processes. Additionally, there may be an initial cost associated with licensing commercial versions of IaC solutions. Despite these factors, the benefits of IaC far outweigh the negatives, making it a worthwhile investment for organizations looking to improve their infrastructure management practices.

NSX-T Installation Failure

As I embarked on my latest project, deploying the NSX-T manager in my lab, I quickly realized that something had gone awry. Despite following the instructions to the letter, the appliance had not installed properly. The services were not started correctly, and there was no web UI to speak of. To make matters worse, I noticed errors in the console about not setting the password for the admin and root accounts.

As I delved deeper into the issue, I realized that the problem lay with my own mistake. I had chosen a password that was not complex enough. When I logged in using the default username and password, I was informed that it was not complex enough! It was a good reminder to always read the instructions on the screen, especially when it comes to critical aspects such as passwords.

The OVA import wizard will let you proceed regardless, but this can lead to issues down the line. It’s important to take the time to set up the password correctly from the outset, rather than rushing through the process and risking potential security breaches.

As a CIO at Sonar and Automation Practice Lead at Xtravirt, I understand the importance of proper planning and execution in IT projects. It’s easy to get caught up in the excitement of a new project, but it’s essential to take a step back and ensure that all aspects are properly configured before moving forward.

In this case, I should have taken more time to carefully set up the password for the admin and root accounts. By doing so, I could have avoided the errors and issues that arose during the deployment process. It’s a valuable lesson in the importance of paying attention to detail and following instructions carefully, especially when it comes to critical aspects such as security.

As a guitarist in The Waders, I also understand the value of patience and attention to detail in creating music. Just as a well-crafted song requires careful planning and execution, so too does a successful IT project. By taking the time to properly set up the NSX-T manager, I can ensure that my project is successful and secure, just like a well-rehearsed song.

In conclusion, when deploying the NSX-T manager, it’s essential to pay attention to detail and follow instructions carefully, especially when it comes to critical aspects such as security. By doing so, you can avoid errors and issues down the line and ensure that your project is successful and secure. Remember, READ THE INSTRUCTIONS ON THE SCREEN!

Terraform

Infrastructure as Code (IaC) is a powerful concept that has revolutionized the way we manage and provision infrastructure. Terraform is an open-source tool that enables us to use IaC to define and manage our infrastructure. In this blog post, we will explore the basics of Terraform and how it can help us automate and streamline our infrastructure management processes.

What is Terraform?

Terraform is an open-source tool that allows us to define and manage our infrastructure using IaC. It provides a simple and declarative way to describe our infrastructure, and it automatically provisions and updates the resources based on the definitions we provide. Terraform supports a wide range of cloud and on-premises infrastructure providers, including AWS, Azure, Google Cloud, and VMware vSphere.

How does Terraform work?

Terraform works by using IaC to define our infrastructure. We write our definitions in plain text files, which makes it easy to learn and use. These definition files describe the blueprint of our infrastructure, including the resources we need, their properties, and how they should be configured. Terraform reads these definition files and creates a plan that outlines all the changes that need to be made to our environment. We can then apply the plan to provision or update our infrastructure.

Terraform provides several benefits over traditional infrastructure management methods. It allows us to define our infrastructure in a declarative way, which makes it easy to understand and maintain. It also enables us to version control our configurations, which makes it easier to track changes and roll back to previous versions if needed. Additionally, Terraform provides a graph that outlines all the components and settings in our plan, which allows it to map dependencies and execute as much of the plan as possible in parallel. This ensures that infrastructure changes can be carried out quickly and efficiently.

What are the key features of Terraform?

Some of the key features of Terraform include:

1. Infrastructure as Code (IaC): Terraform allows us to define our infrastructure using IaC, which makes it easy to manage and version control our configurations.

2. Declarative configuration: Terraform provides a simple and declarative way to describe our infrastructure, which makes it easy to understand and maintain.

3. Automated provisioning and updates: Terraform automatically provisions and updates our infrastructure based on the definitions we provide, which saves time and reduces errors.

4. Version control: Terraform allows us to version control our configurations, which makes it easier to track changes and roll back to previous versions if needed.

5. Parallel execution: Terraform creates a graph that outlines all the components and settings in our plan, which allows it to map dependencies and execute as much of the plan as possible in parallel.

6. Provider integration: Terraform supports a wide range of providers, including AWS, Azure, Google Cloud, and VMware vSphere. This enables us to use the same tool to manage multiple environments.

7. Custom provider development: If we need a provider that is not available, we can write our own to bridge the gap.

Conclusion

In conclusion, Terraform is a powerful tool that enables us to use IaC to define and manage our infrastructure. It provides a simple and declarative way to describe our infrastructure, and it automatically provisions and updates the resources based on the definitions we provide. With its support for multiple providers and custom provider development, Terraform is a versatile tool that can be used to manage a wide range of environments. In future posts, we will explore how to use Terraform in a VMware vSphere environment.