Separating Providers from the Terraform core

Terraform is my favorite tool for infrastructure building and managing. Although I use it mostly for the vSphere and vCloud Director environments (you can see more here), I know that I am far from making full use of it. Hashicorp project is growing so fast, there are some problems with scalability. Moreover, as Hashicorp wrote on their blog, Providers maintaining is quite hard because of their number. Hence decision about separating Providers from the Terraform core. This change will be applied in the 0.10.0-beta1 version of Terraform. This move will help developers not associated with the Hashicorp. No more conflicts with Continue reading

Cannot customize CentOS on vCloud Director

Last week I spent some time creating and updating vCloud Director templates. It’s a very long process if you want to do everything perfectly. You know, one mistake and you have to deploy the vApp, change the configuration, update metadata and add vApp to catalog one more time. During this process, I faced the problem with CentOS 7.3. It was a fresh installation from official DVD iso. Everything worked fine except one thing – customization. Of course, I chose the open-vm-tools package and made sure that daemon is running, but customization didn’t want to work properly. Finally, I found the Continue reading

How to create credentials in Jenkins

Every system, application or another solution has some authentication providers. Sometimes it’s a local password storage, sometimes administrator can implement AD (or another LDAP), Radius, OAuth etc. Nobody can reach the system without username and password, private key, secret token etc. Words below are so obvious that I feel stupid for writing them. But anyway it’s a very important entry into my today post – how to create credentials in Jenkins. Because even Jenkins has to use credentials in its projects and builds. If you have ever used Jenkins, you probably know that you can pass username and password as a Continue reading

Jenkins has stopped working after upgrade to 2.54

Jenkins upgrade is very easy – you just need to use the package manager and run one command. After the update, Jenkins processes are restarted and the system is ready to use. Since version 2.54 you may face some problems with the update. Jenkins can be resistant to restart and returns the 503 error when you try to access web UI. It is caused by the Java (yes, I know, “it’s always Java!”). Jenkins has been using Java 8 since the 2.54 version, hence you may have problems if you still use Java 7. And it’s more than likely that Continue reading

Using Terraform to deploy VM with an additional disk in vSphere

Some time ago I wrote a post, which explains how to deploy VM in vSphere using a Terraform. It’s something like a universal Terraform configuration for vSphere. You don’t need to manually specify any variable. The most vars are based on the variable mappings. Today I want to show you another code – this time you will see how to create a VM with an additional disk. In theory, it doesn’t need many changes, but I am not confined just to create a disk. I also want to make it usable by the Operating System and ensure that disk will Continue reading

PowerCLI in the PowerShell Gallery – how to and why?

PowerCLI is the best managing and automation tool for vSphere environments. I cannot imagine my work without this fantastic thing. The only one inconvenience I see in the PowerCLI is an installation procedure. In every single Windows I have to download and install .msi package. But now it has changed! We can find PowerCLI in the PowerShell Gallery – now there are two versions, 6.5.1.5377412 and 6.5.1.5273662. How to install PowerCLI from the PowerShell Gallery? Installation process is very simple. You just need to type the following command in your PowerShell (don’t forget to run as Administrator):

If you cannot install because of “The Continue reading

Alias for Connect-VIServer arguments – PowerShell functions

I think most of you agree with me when I say that typing “Connect-VIServer -Server name-of-server” is very annoying. Especially when you have many vCenter Servers to manage. First thing that comes to everybody’s mind is “hey, we can use PowerShell aliases”! And yes, but only for shorten cmdlet. You can have some problems with passing parameters into the alias. But don’t worry, there is another – better in my opinion – way to do that. Functions. It’s a simple way for creating aliases for Connect-VIServer arguments. Without further ado, there you are a template of the mentioned functions: View the code Continue reading

Ansible MySQL role – creating databases and users

When you have only one local database server dedicated to your application, there are no problems with creating a database and a user. But the problem appears when we want to create many databases and users manually. Of course we can create a bash script and run it everytime we want to create a new database and user, but there is another and easier way. This way is called Ansible. Ansible is a really helpful and excellent tool for automation. I have tried to use Ansible anytime since I have heard about it the first time. Some time ago I Continue reading

Check your domain expiration with Icinga2

It’s good to know what is going on inside your infrastructure. Monitoring is one of the most important systems (including backup – verified backup of course!) used by all companies. There are tons of tools which help sysadmins with monitoring their infrastructure. I have started my monitoring adventure with Icinga2, and for now, I don’t plan to change it. 🙂 Icinga2 has not only great community, but also distributed monitoring possibility and such obvious thing like High Availability. Icinga2 has also many plugins and everyone can do one by their own. I have taken this opportunity and I have created simple Continue reading

Terraform 0.9.0 was released

It has been two weeks since Terraform 0.9.0-beta2 was released, and now we can enjoy a new stable version! It’s a pleasure to say that 3 hours ago Hashicorp has released Terraform 0.9.0. In the current version you can find changes I mentioned in the previous post and of course much more! I think that the most important things in the newest release are Remote Backends and State Locking. Remote Backend replaces remote state and it changes architecture of tracking the state of your infrastructure. You can find more information in the #11286 Pull Request and in official Terraform documentation. There is a Continue reading