Skip to content

ochaloup/byteman-workshop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Byteman basics: workshop

These are resources for workshop about Byteman initially created for DevConf.CZ - Brno 2018.

The repository contains slides for the presentation and then directories for individual tasks that the workshop consists from (1235).

Prerequisites

What you will need to have on your machine to get running particular tasks

Starting the workshop and install instructions

Linux

Get prerequisites (using script)

You can use script setup.sh to download binaries from the net for you and settings the expected variables expected to be set in console for task completion.

  1. git clone https://github.com/ochaloup/byteman-workshop.git

  2. cd byteman-workshop

  3. source setup.sh and follow the printed instructions

Warning
tested with bash, could not work with others (e.g. csh makes troubles)

Get prerequisites (manual steps)

Get the workshop sources
  1. clone repository of this workshop git clone https://github.com/ochaloup/byteman-workshop.git

  2. export BYTEMAN_WORKSHOP="$PWD/byteman-workshop"

  3. mkdir "$BYTEMAN_WORKSHOP/libs"

Warning
steps referred through the workshop instructions are relative to the directory $BYTEMAN_WORKSHOP/libs.
The libraries could be placed at whatever directory which fits for you.
  1. installing java

    • option 1: dnf install java java-devel

    • option 2:

      1. download java jdk (jdk-8u161) archive from https://www.java.com/en/download/linux_manual.jsp to $BYTEMAN_WORKSHOP/libs

      2. tar -C "$BYTEMAN_WORKSHOP/libs" -xzf "$BYTEMAN_WORKSHOP/libs/jdk-8u161-linux-x64.tar.gz"

      3. export JAVA_HOME="$BYTEMAN_WORKSHOP/libs/jdk1.8.0_161"

      4. export PATH="$JAVA_HOME/bin:$PATH"

  2. installing Maven

    • option 1: dnf install maven

    • option 2: download Maven archive to $BYTEMAN_WORKSHOP/libs

      1. wget http://www-eu.apache.org/dist/maven/maven-3/3.5.2/binaries/apache-maven-3.5.2-bin.zip -O $BYTEMAN_WORKSHOP/libs/maven352.zip

      2. unzip -d "$BYTEMAN_WORKSHOP/libs" "$BYTEMAN_WORKSHOP/libs/maven352.zip"

      3. export MAVEN_HOME="$BYTEMAN_WORKSHOP/libs/apache-maven-3.5.2"

      4. export PATH="$MAVEN_HOME/bin:$PATH"

    • to check Java and Maven are installed mvn -version

  3. download Byteman binaries (see http://downloads.jboss.org)

    1. wget http://downloads.jboss.org/byteman/4.0.0/byteman-download-4.0.0-bin.zip -O "$BYTEMAN_WORKSHOP/libs/byteman400.zip"

    2. unzip -d "$BYTEMAN_WORKSHOP/libs/" "$BYTEMAN_WORKSHOP/libs/byteman400.zip"

    3. export BYTEMAN_HOME="$BYTEMAN_WORKSHOP/libs/byteman-download-4.0.0"

    4. export BYTEMAN_JAR="$BYTEMAN_HOME/lib/byteman.jar"

    5. to check that byteman jar exists file "$BYTEMAN_JAR" (expected output …​: Java archive data (JAR)) or java -jar "$BYTEMAN_JAR" (expected output no main manifest attribute, in…​)

  4. compile java sources cd $BYTEMAN_WORKSHOP; mvn install -DskipTests

Note
now you can find the Byteman programmer’s guide at $BYTEMAN_WORKSHOP/libs/byteman-download-4.0.0/docs/byteman-programmers-guide.pdf or published at http://downloads.jboss.org/byteman/4.0.0/byteman-programmers-guide.html

Windows, MacOS, …​

I’m sorry there is no precise instructions right now, see instructions for the Linux and adjust it for your purpose.

Note
Instruction for the installation and running the tasks were prepared and tested only for Linux. Feel free to contribute here :-)
Note
on Windows instead of bash keyword export use cmd keyword set

To verify prerequisites

Check the following environmental variables exists

  • BYTEMAN_HOME

  • BYTEMAN_JAR

  • JAVA_HOME

Try to run

  • mvn -version

About

Workshop to show Byteman (http://byteman.jboss.org) basics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published