Přeskočit na hlavní obsah

Příspěvky

Zobrazují se příspěvky z 2016

jOpenSpace.cz 2016 - dobíječka baterek

Po loňské pauze se mi opět podařilo dostat na ne konferenci jOpenSpace, která probíhala o víkendu 7.-9.10. kousek od Pelhřimova. V průběhu víkendu měl každý z účastníků vyhrazených 10 minut aby osvětlil (lightning talk formou) své téma. Já jsem prezentoval projekt  Sunstone , kterému jsem se věnoval v uplynulém roce v souvislosti s testováním JBoss EAP v cloudech a v Dockeru. Program konference na  svém blogu shrnul Jarda Holaň, takže já zmíním jen krátce co mě zaujalo a jaký jsem měl z celého víkendu dojem. Bezpečnost Mile mě překvapilo, že několik prezentací bylo zaměřeno na bezpečnost a její testování. Já jsem si při nich do svého TODO-listu připsal položky: projít si WebGoat (deliberately insecure web application maintained by OWASP) vyzkoušet Burp Suite na penetrační testování Headhunteři V pátek při večeři probíhala zajímavá diskuse s klukama ze společnosti Zeebra Recruiting, kteří nám dali nahlédnout pod pokličku svého zaměstnání. Mluvilo se o tom, jak se v

Clean-up blobs in Azure storage account with Azure CLI

If you realize at some point of your bright Azure future you don't remove VM disks correctly (like me in JCLOUDS-1170 ) you'll probably want to do a storage account clean up. Here is, how I did it on my linux desktop using Azure CLI. As I wanted to keep some private OS images which were located in the storage account too, I moved them first into a newly created storage container. # Prerequisities installed azure-cli (I personally use the latest docker image microsoft/azure-cli with the tool) installed jq tool for parsing JSON # Set up STORAGE_ACCOUNT=" PutYourStorageAccountNameHere " STORAGE_KEY=" PutYourStorageAccountAccessKeyHere " # Move/backup OS images to a new container # create new storage container for OS image blobs azure storage container create -a $STORAGE_ACCOUNT -k "$STORAGE_KEY" os-images # linux images to be kept for IMG in eap-7-rhel-7.2 eap-7-rhel-7.2-service; do ORIG_BLOB=$(azure vm image show

Create your own SSH-able Windows image with JBoss EAP on Azure

This entry describes one of possible ways how to create SSH-able Windows image with JBoss EAP 7 installed on MS Azure cloud (classic VM mode - asm). It's written mostly as commands with some comments - use your imagination (or a boring documentation), when you're not sure what does it do. If you use these step, then do it carefully - it disables the firewall for instance! Don't forget to change the USER_PASSWORD value! # Prerequisites # Azure CLI - install and configure classic mode # install either Azure CLI for your system or use Docker image provided by Microsoft # sample script for the Docker version: https://gist.github.com/kwart/ffd6dc34bb8d5e297bc34ce10764bfe6 # login and configure classic mode azure login azure config mode asm # Create Azure storage account (with container for the image) # Create VM from public Windows image # name of virtual machine used to prepare new OS image export AZURE_HOST=eap7-prepare # target image name export

Ubuntu (Mate 16.04) - disable WiFi when ethernet cable is plugged in

Use following script to create rule, which disables wifi if the ethernet cable connection is up. The solution is based on this stackoverflow article . sudo cat > /etc/NetworkManager/dispatcher.d//99-disable-wifi-if-not-needed <<EOT #!/bin/bash if [ "$1" = "enp0s25" ]; then case "$2" in up) nmcli radio wifi off ;; down) nmcli radio wifi on ;; esac fi Replace the enp0s25 with the correct "cable" interface if needed.

Ignore the boring SSH error message - Host identification has changed!

The problem If you work with virtual machines in clouds, or you run an SSH server in Docker containers, then you've probably met the following error message during making ssh connection: (I'm connecting through SSH to a docker container) ~$ ssh -p 8822 root@localhost @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY! Someone could be eavesdropping on you right now (man-in-the-middle attack)! It is also possible that a host key has just been changed. The fingerprint for the ECDSA key sent by the remote host is SHA256:smYv5yA0n9/YrBgJMUCk5dYPWGj7bTpU40M9aFBQ72Y. Please contact your system administrator. Add correct host key in /home/jcacek/.ssh/known_hosts to get rid of this message. Offending ECDSA key in /home/jcacek/.ssh/known_hosts:107 remove with: ssh-keygen -f "/home/jcacek/.ssh/know

Playing live demos on Linux

I like live demos during presentations. When they work and don't take too much time. And I don't like when the presenter types too much. So I've created the demo-step script . History I've tried to find a way how to "play" live demos (on Linux) in a natural way. First I've found solution by putting keyboard shortcuts into the ~/.inputrc configuration file ( example here ). The disadvantage is, you have to remember, what's the next shortcut. I'm not so good in remembering shortcuts, so I've created simpler solution by utilizing xdotool Linux application ( xdotool home ). Sample usage You can find sample presentation with uses the demo-step on my GitHub. You just need to put the live demo commands into the ~/demo.commands text file and then play them by running demo-step after pressing a keyboard shortcut. Sample content of the ~/demo.commands : #\n# search images in Docker public registry (Docker hub)\ndocker search wil