I have been using Azure Free Trial subscription before I got my BizSpark account. Because the subscription was ready after the trial expired, all trial items have been blocked, but still visible in Azure (see Figure 1).
I thought that I only change the subscriptions of the items to the BizSpark. But only possibility is to remove. So after arguing and googling I tried to contact Azure support page.
- Go the support page
- Select “Get support” (Figure 2)
- Fill ticket information (Figure 3)
- Select “Subscription and Migration” and press “Continue” (Figure 4)
- Specify Category to “Transfer data to different subscription” (Figure 5) and press “Continue”
Next day, a guy from Azure Support called me that there is a problem with my subscriptions. Because I was “too fast” and I have already created new items in BizSpark subscription, the migration is not possible – target subscription must be clear. to be more specific, there are some preconditions which must be satisfied before migration (taken from email from Azure Support):
- We do not support selective service transfer; transfer only a selected hosted service, storage service from one subscription to another. This may become available in future but today, we must transfer all services or none.
- The source as well as destination subscription must be active.
- The destination subscription must be completely empty. (We do have separate process to migrate to a subscription with services running, however it requires more time.)
- The source and destination subscriptions must have the same service administrator until the migration is complete.
- The source and destination subscription cannot contain deployments/affinity groups with the same name.
- There are some services that we cannot migrate and other services you will migrate yourself. Please see the table below.
|Azure can move:||You must move:||Unable to move:|
|Cloud Services||SQL DB||BizTalk Services|
|Web Sites||Active Directory||HD Insight|
|Storage||Hyper-V Recovery Manager|
|Multi Factor Authentication||Azure Store|
|Traffic Manager||Import / Export|
|Virtual Network||Management Services|
|Access Control Service (ACS)||Azure Automation|
|Reserved IP Address + Reserved IPs under the list|
So I have deleted all new items in the new subscription and replied to Azure Support that the migration can be proceed, even Force (it is also possible, but must be proceed by another Azure Support Team, so it takes time).
So still waiting, hope that tommorrow it will be proceeded :)…
Setting up project build in Jenkins is very easy – there are a lot of plugins fow varioous languages, notification, pre and post build actions. But the most important path is Build Action itself.
Build Action for Python Project Build with Unit Test and Code Analysis
PYENV_HOME=$WORKSPACE/.pyenv/ # Delete previously built virtualenv if [ -d $PYENV_HOME ]; then rm -rf $PYENV_HOME fi # Create virtualenv and install necessary packages virtualenv --no-site-packages $PYENV_HOME . $PYENV_HOME/bin/activate pip install --quiet -r requirements.txt pip install --quiet nosexcover pip install --quiet pylint nosetests --with-xunit --cover-package=myapp --cover-erase --with-xcoverage ./test pylint -f parseable myapp/ | tee pylint.out
Build Action for Python Module Build with Unit Test and Code Analysis
PYENV_HOME=$WORKSPACE/.pyenv/ # Delete previously built virtualenv if [ -d $PYENV_HOME ]; then rm -rf $PYENV_HOME fi # Create virtualenv and install necessary packages virtualenv --no-site-packages $PYENV_HOME . $PYENV_HOME/bin/activate pip install --quiet nosexcover pip install --quiet pylint pip install --quiet $WORKSPACE/ # where your setup.py lives nosetests --with-xunit --cover-package=myapp --cover-erase --with-xcoverage ./tests pylint -f parseable myapp/ | tee pylint.out
Post-Build Actions for Both Configurations
CI service providing builds, tests and deployment is must when you want to speedup your work and get rid of useless work. There exist various solutions these days. All of them do almost same, but not every with same requirements.
We had following needs:
- Easy to configure
- Notifications, connection to other services like Bitbucker, Slack
- Support for Python, C++, C#
- Run on own linux-based virtual machine together with other services (wiki)
- TFS Online
- It is standalone, but free up to 5 contributors, almost everything can be done easily.
- Azure interconnection
- But it does not support C++ and cannot be run by ourselves
- TFS Server
- Robust solution with dozens of features
- Comunity edition
- but needs sufficient machine to be able to run Windows and
- After the TFS Server maybe the best one
- A lot of features, plugins, itnerconnections with other JetBrains tools
- Comunity edition
- Dozens of plugins, interconnections
Even I was or I’m using all of them and because of linux-based machine, my hidden favorite was TeamCity. It looks more “professional” that Jenkins :).
So, let’s setup it. I have established the smallest Azure virtual machine:
Standard Virtual Machine A0 (Shared core, 768 MB memory) with Ubuntu Server 14.04 LTS. I thought it is enought – there will be wiki which uses almost no resources and CI itself, which consume more resources only it is doing something – building, testing or deploying. I have established TeamCity, run it and … nothing. OutOfMemory on the machine. Even I have set different arguments for the JVM,TC neeed more. So I have found that minimal requirements are 750MB only for the JVM (https://confluence.jetbrains.com/display/TCD8/Installing+and+Configuring+the+TeamCity+Server#InstallingandConfiguringtheTeamCityServer-SettingUpMemorysettingsforTeamCityServer).
Ok, lets set better machine – Standard Virtual Machine A1 (1 core, 1.75 GB memory). TC was running. But the ‘feeling’ from the browsing was ‘slow’. So I established simple build of the Python project. It was running fine and the build was successful. Nice. But the second build failed – not enought memory. What?! Next Azure VM A2 has 3.5 GB memory which is needless!
TeamCity. The last change was Jenkins. Set A0 again, setup build, run and … success! Run it again, again, again and fail. Check the logs … not enought memory. Ok, after five minutes of cursing on greedy JVM, I setup A1 back. Jenkins web was ‘very fast’. Seems good, lets try to run multiple builds, multiple times to be sure. So after 20 successful builds, no memory execption and check of VM memory consumption, it seems it is enought (but I will see in the future)!
I have to say that it was surprising to me that even you want to have own CI for a few of your projects and run it ourself, you need a quite strong machine to be able to have proper running CI service.
AutoMapper is a superior class for providing mapping between objects in .NET which makes your code transparent. I wanted to use something similar in Python, but didn’t find anything. So inspired by AutoMapper, I have created its ‘port’ in Python.
You can find it https://github.com/marazt/object-mapper on GitHub.
Full description with examples is described in README.md