On my birthday I've got WD Black 750GB for my notebook. Only recently I had time to replace it in Lenovo.
The movement process went smoothly. To move the existing partitions to the disk I have used Acronis True Image, which can be downloaded from WD site for free.
One problem I encounter is how to resize the partition after the partition movement? Windows builtin utility couldn't help me. It couldn't resize the partition who has free space before the begining. But I have found out the Partition Manager 14 Free Edition which is free for personal use. With it I could resize the partition in no time.
Now my PC boots much faster then before. Think the next step is to get the SSD for 1 Tb :-).
This blog is a collection of minds around linux, java, javascript, etc. Looking for great opportunities.
пятница, 29 января 2016 г.
четверг, 14 января 2016 г.
Learn Git in a Month of Lunches
Happy New Year, 2016!
I have decided to structure my knowledge of git, so I took the Learn Git in a Month of Lunches.
This is book is easy to read and understand. Every chapter contains no bloat and self-contained. It's written like tutorial and contains practice labs.
Besides git it also has the description about tools like Sourcetree and Eclipse git integration.
If you like you can start to read from any chapter.
What I particularly like is the chapter about git rebase. I think this is a must have book on your shelf.
I have decided to structure my knowledge of git, so I took the Learn Git in a Month of Lunches.
This is book is easy to read and understand. Every chapter contains no bloat and self-contained. It's written like tutorial and contains practice labs.
Besides git it also has the description about tools like Sourcetree and Eclipse git integration.
If you like you can start to read from any chapter.
What I particularly like is the chapter about git rebase. I think this is a must have book on your shelf.
воскресенье, 6 декабря 2015 г.
Arquillian testing
Wanted to learn more about testing with Arquillian and how to use ShrinkWrap API to create deployment artifacts?
Actually, a lot of useful information can be found in the book Continuous Enterprise Development in Java. Although all the information can be found on the Internet this book has consistency in how this information present. So, you shouldn't strive to find any more information regarding the API.
Actually, a lot of useful information can be found in the book Continuous Enterprise Development in Java. Although all the information can be found on the Internet this book has consistency in how this information present. So, you shouldn't strive to find any more information regarding the API.
пятница, 4 декабря 2015 г.
Arquillian integration testing with DB2 and Wildlfy 8.2.1
Hi!
You have decided that you need integration tests in addition to your unit tests. How can we automate integration testing of J2EE code?
Arquillian to rescue! Arquillian is integration testing framework for Java EE. To get started you need an Arquillian library, adapter container, container and test :-).
Is sounds a lot like to configure. Well no so many by hand. For the integration test I have chosen Wildfly 8.2.1. Also I want that Arquillian itself managed starting and stopping of wildfly.
For those who are impatient look into github: https://github.com/chernykhalexander/arquillian_db2_J2EE.git.
The easiest way to add the arquillian in pom.xml is to you jBoss forge tool. Forge is a special utility to manage java projects. Or you can look into pom.xml on github.
This pom also:
1) downloads the wildfly 8.2.1 distribution and expand it into the target directory.
2) copy the IBM DB2 driver into the expanded wildfly
3) uses maven-failsafe-plugin to run integration-tests. It's execution is bounded to integration-test and verify goals. If you need to execute integration test make sure integration test files end with "IT".
How to define the JNDI datasource? This is what wildfly-ds.xml responsible for.
Other interesting part is integration test itself. Again, you can ease the creation of test with forge tool.
When creating the test pay attention to the @deployment method. You need to specify all classes and files your test uses.
After all have been done mvn integration-test and that is all! Happy testing.
You have decided that you need integration tests in addition to your unit tests. How can we automate integration testing of J2EE code?
Arquillian to rescue! Arquillian is integration testing framework for Java EE. To get started you need an Arquillian library, adapter container, container and test :-).
Is sounds a lot like to configure. Well no so many by hand. For the integration test I have chosen Wildfly 8.2.1. Also I want that Arquillian itself managed starting and stopping of wildfly.
For those who are impatient look into github: https://github.com/chernykhalexander/arquillian_db2_J2EE.git.
The easiest way to add the arquillian in pom.xml is to you jBoss forge tool. Forge is a special utility to manage java projects. Or you can look into pom.xml on github.
This pom also:
1) downloads the wildfly 8.2.1 distribution and expand it into the target directory.
2) copy the IBM DB2 driver into the expanded wildfly
3) uses maven-failsafe-plugin to run integration-tests. It's execution is bounded to integration-test and verify goals. If you need to execute integration test make sure integration test files end with "IT".
How to define the JNDI datasource? This is what wildfly-ds.xml responsible for.
Other interesting part is integration test itself. Again, you can ease the creation of test with forge tool.
When creating the test pay attention to the @deployment method. You need to specify all classes and files your test uses.
After all have been done mvn integration-test and that is all! Happy testing.
вторник, 1 декабря 2015 г.
Vagrant. Install on CentOS 7.1
Here is a small tutorial on how to install Vagrant on CentOS 7.1:
- Download Vagrant:
wget -q https://dl.bintray.com/mitchellh/vagrant/vagrant_1.7.4_x86_64.rpm
- Setup Vagrant:
yum localinstall vagrant_1.7.4_x86_64.rpm
- Check Vagrant version:
[root@localhost ~]# vagrant --version Vagrant 1.7.4 - Download VirtaulBox:
- Setup VirtualBox:
sh VirtualBox-5.0.6-103037-Linux_amd64.run
- Setup dependencies:
yum install binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-PAE-devel dkms kernel-devel
- Setup kernel module:
KERN_DIR=/usr/src/kernels/3.10.0-229.14.1.el7.x86_64export KERN_DIR/sbin/rcvboxdrv setupStopping VirtualBox kernel modules [ OK ]
Recompiling VirtualBox kernel modules [ OK ]
Starting VirtualBox kernel modules [ OK ]
вторник, 24 ноября 2015 г.
DB2 CLP. Disable autocommit
To disable autocommit is db2 clp write the following command:
UPDATE COMMAND OPTIONS USING c OFF.
To check the results write the following command:LIST COMMAND OPTIONS
вторник, 3 ноября 2015 г.
Linux Remote Desktop in Docker (part 1)
Here are my investigations about remote technologies in Linux.
My aim - to create docker container with firefox and access it remotely over the network.
This is kind of manual testing environment.
My aim - to create docker container with firefox and access it remotely over the network.
This is kind of manual testing environment.
пятница, 16 октября 2015 г.
Docker. Network settings
Docker network settings are the following:
--dns
for setting up DNS
server, which will be used by container.
-- dns-search.
FQDN part without host name.
If --dns or --dns-search is not
given, then the /etc/resolv.conf ile of the container will be the
same as the /etc/resolv.conf file of the host the daemon is running
on.
-h
–hostname allows to setup the hostname of the container. The related record will be added to the etc/hosts.
--link. Allows to setup the connection to other container. Knowledge IP
of other container is not required. Only the name of the container.
To assign the name to the container one should use --name flag.
For example, there are two containers: web and db. To create the link between containers one should stop the web container and start it with --name flag like this:
#
docker run -d -P --name web --link db:db <image> startserver.sh
By using docker -ps you can see the links between containers.
Also in containers env variables and /etc/hosts are altered.
Also, container can bind the ports to the host ports. Use-p flag:
1. docker
run -p
IP:host_port:container_port
2. docker run -p
IP::container_port
3. docker run -p
host_port:container_port
When necessary containers can be moved to another subnet. For this the docker daemon should be used with —bip flag.
Docker. Limit container resources.
Here is how to limit the containers resources:
Limit by CPU:
Use docker run -c option.
Limit RAM:
docker run -m 1024m
Limit by HDD:
There is no universal way to achieve it. It is recommended to use devicemapper storage
driver.
Also, by default the size of container is 10 Gb. This can be tuned by changing the parameter dm.basesize.
пятница, 9 октября 2015 г.
Docker. Storage driver for CentOS 7.1
By default, when starting Docker container following message appears:
Usage
of loopback devices is strongly discouraged for production use.
Either use `--storage-opt dm.thinpooldev` or use `--storage-opt
dm.no_warn_on_loop_devices=true` to suppress this warning.
Reading the man docker page reveals the following:
The
only backend which currently takes options is devicemapper.
Подписаться на:
Сообщения (Atom)