Author Archives: Kagarlickij Dmitriy

Automate Jenkins slave running macOS connection

Although XCode server is almost perfect for building iOS apps, Jenkins is still more popular. If your application consists of a few parts such as a database, backend, frontend, Android, and iOS apps you typically want to have the same CI/CD for all components.

My Jenkins master is running in AWS cloud together with a dozen of Linux and Windows slaves. However, iOS app can be built only on macOS and you have to use Apple computer to build it.  It’s typically a Mac Mini computer located in the office.

In this post we’ll consider secure and reliable connection between mac in the office and Jenkins master in AWS cloud.

Continue reading

Jenkins and GitHub integration

Both Jenkins and GitHub are very popular, so it couldn’t be a problem integrating them. It still might be a bit confusing if you’re doing it for the first time. That’s why I decided to spend a few minutes to show you guys how it can be done.

Jenkins master can be accessed through the URL different from the one specified in Jenkins configuration.

Why might we need this? Well, you probably want your Jenkins server to be publicly accessible (this is required for GitHub integration, by the way) and since it’s public you typically want to use an encrypted HTTPS connection.

Well, you can install nginx proxy to achieve this, but in this case you’ll have to maintain SSL certs, which obviously sucks, especially if you can use AWS Certificate Manager with AWS ELB.

Another reason to use different URL is to save your time. When you use Windows slaves via JNLP there’re well-known issues with both nginx and load balancers.

And the last but not least reason is that “LAN” connection between Jenkins master and slaves is still more secure and faster, so it’s preferable in most cases.

So let’s start implementing Jenkins and GitHub integration within these conditions!

Continue reading

Windows 10 connected to VPN: DNS issue and solution

We use OpenVPN to connect to some resources in AWS private subnets.
It works as expected on macOS, iOS, and even on old Windows 7, but not on Windows 10.
In case of Windows 10 when you’re connected to VPN (doesn’t matter OpenVPN, L2TP or even PPTP) you will still get responses from DNS server which is set on your Ethernet (or WiFi) adapter.

block-outside-dns option for OpenVPN didn’t fix this problem and I decided to provide solution for all VPN types, so here it is:

Continue reading

Keep config files untouched in Git branches

In this post we’ll consider rather common situation when you’ve got application with dedicated configuration file and at least two environments: dev and prod.
Application in dev env is using dev database and prod application is using prod database;
Database connection strings are stored in app.config file, so you have to have different app.config files in dev and prod Git branches.
The most common suggestion about managing this challenge is to use git attributes merging policy, so let’s see how to deal with it.

Continue reading

Migrate Git repo from BitBucket to VSTS

migrationIn this post I’ll show how Git repo can be completely transferred from BitBucket to Visual Studio Team Services.
However, this instruction will be relevant for Git repo transfer between any origins, such as GitHub, Stash, GitLab, etc.

Before migration starts, it’s important to commit and push all changes from local repositories to the current origin (which happens to be BitBucket in our example).

Continue reading

RAM disk in OS X

If you want to have really fast disk and have enough RAM (f.e. I have 32Gb) you can create so called “RAM disk”:

diskutil erasevolume HFS+ RAMDisk1 $(hdiutil attach -nomount ram://41943040)

This will create 20Gb drive (10240*2048=41943040)

When you finish working gust unmount drive in Finder or Terminal ;)

Hypervisor performance on regular desktop

Choosing hypervisor for regular desktop/laptop running Windows seems to be easy – Hyper-V was and still the best.

But for some activities (such as running Vagrant) VirtualBox might be more suitable.

If you have to deal with server infrastructure running VMware it’s reasonable to use VMware Desktop because you can easily transfer VMs.

From CPU & RAM perspective all hypervisors are more or less the same, and I don’t care about GPU because I have a deal with servers.

Talking about networking VMware is good enough, but Hyper-V with “gate VM” is much more powerful and flexible.

But what’s really matters is HDD performance. I’ve tested it with simple tool called CrystalDiskMark , and here’re results:

Screen Shot 2016-08-16 at 22.12.29

PS On my MacBook Pro 15″, MacBook 12″ and iMac 27″ Parallels are much faster than VMware Fusion, and networking is definitely better – it’s really matters when you’re working with servers.

I hope this info will be useful for you, and if you need any help feel free to use contact from on the main page.

Windows Defender disable with PowerShell

Windows Defender is a feature which you likely want to remove, and you can do this with PowerShell:

I hope this info will be useful for you, and if you need any help feel free to use contact form on the main page.

Windows Server 2016 sysprep failed

Sysprep for Windows Server 2016 sysprep failed for me few times, so I want to share solution with you:

I hope this info will be useful for you, and if you need any help feel free to use contact form on the main page.

Git: tasks

If you work with a small team you might not need such powerful tool as Jira, but you still need to be able to use tasks, bugs and proposals.
In this case BitBucket issues are exactly what you need.

BitBucket issues support well-formatted descriptions, attachments, assignees, kinds and priorities – almost all that your small team might need:

Continue reading