18.05.2017

Setup Jenkins Server on Ubuntu 16.04

 

see: https://www.digitalocean.com/community/tutorials/how-to-install-jenkins-on-ubuntu-16-04

> wget -q -O - https://pkg.jenkins.io/debian/jenkins-ci.org.key | sudo apt-key add -
> echo deb http://pkg.jenkins.io/debian-stable binary/ | sudo tee /etc/apt/sources.list.d/jenkins.list
> sudo apt-get update
> sudo apt-get update
> sudo apt-get install jenkins
> sudo apt-get install maven
> sudo apt-get openjdk-8-jdk-headless

[solved/gelöst] Synology DSM 6 SSH key login + git

 

Synology 415+, SSH Aktiv, git Server installiert, weitere Voraussetzungen im Detail:

https://www.chainsawonatireswing.com/2012/01/15/ssh-into-your-synology-diskstation-with-ssh-keys/

image

Fehlermeldung: “Server refused our key”

Lösungsideen / Fehlerquellen:

  • /etc/ssh/sshd_config:
    #RSAAuthentication yes
    PubkeyAuthentication yes
    AuthorizedKeysFile .ssh/authorized_keys

 

  • Zugriffsrechte Datei .ssh/authorized_keys und Ordner .ssh
    > sudo chmod 700 .ssh
    > sudo chmod 644 .ssh/authorized_keys

 

  • Putty –Public-Key :
    image
  • Dateiinhalt authorized_keys: jeder Key vollständig nur in eine Zeile (keine Zeilenumbrüche)

… und es klappt immer noch nicht, dann

  • die Rechte der User-Ordner /var/services/homes/ prüfen. Bei Synology sind diese standardmässig auf “777” gesetzt - einfach auf 755 ändern
    > sudo chmod 755 uusseerr

    image

und TATAAA - es klappt !

16.05.2017

Servicemix + Camel + Activemq

 

 

Hawt.io Installation

feature:repo-add hawtio

feature:install hawtio

 

http://localhost:8181/hawtio/

Login: smx:smx , karaf:karaf

image

image

http://hawt.io/getstarted/

Install Karaf Webconsole

feature install webconsole

Default Login: karaf, Pass: karaf

http://localhost:8181/system/console 

image

Install ActiveMq WebConsole

feature install activemq-web-console

http://127.0.0.1:8181/activemqweb/index.jsp

image

 

Camel from File / Noop=true

http://camel.apache.org/file2.html

Gogo ServiceMix Web-Konsole

http://127.0.0.1:8181/gogo 

 

image

Java-Code

Simple File2File Route

from("file:data/in?noop=true").id("file-in")
                .log("Nachricht: ${body}")
       
        .to("file:data/out")
       
        ;

 

pom.xml

 

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

    <groupId>de.predic8</groupId>
    <modelVersion>4.0.0</modelVersion>
    <artifactId>vacation-camel</artifactId>
    <packaging>jar</packaging>
    <version>1.0-SNAPSHOT</version>

    <name>Vacation ESB Sample Apache Camel</name>

    <properties>
        <camel.version>2.14.0</camel.version>
        <activemq-version>5.10.0</activemq-version>
        <hawtio.version>1.4.45</hawtio.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <targetJdk>1.8</targetJdk>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <gmaven.runtime>1.8</gmaven.runtime>
    </properties>

    <dependencies>

        <!-- Camel -->
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-core</artifactId>
            <version>${camel.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-spring</artifactId>
            <version>${camel.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-jetty</artifactId>
            <version>${camel.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-xmljson</artifactId>
            <version>${camel.version}</version>
        </dependency>

        <!-- hawt.io, jolokia -->
        <dependency>
            <groupId>org.jolokia</groupId>
            <artifactId>jolokia-core</artifactId>
            <version>1.2.3</version>
        </dependency>
        <dependency>
            <groupId>org.jolokia</groupId>
            <artifactId>jolokia-jvm</artifactId>
            <version>1.2.3</version>
        </dependency>   
        <dependency>
            <groupId>io.hawt</groupId>
            <artifactId>hawtio-embedded</artifactId>
            <version>${hawtio.version}</version>
        </dependency>

        <!-- Logging -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.7.7</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <version>1.7.7</version>
        </dependency>

        <!-- ActiveMQ -->
        <dependency>
            <groupId>org.apache.activemq</groupId>
            <artifactId>activemq-camel</artifactId>
            <version>5.10.0</version>
        </dependency>
        <!-- Spring -->
        <!-- dependency> <groupId>org.springframework</groupId> <artifactId>spring-web</artifactId>
            <version>3.2.8.RELEASE</version> </dependency> -->
    </dependencies>

    <build>
        <defaultGoal>install</defaultGoal>
        <finalName>WeatherMapping</finalName>
        <plugins>

            <plugin>
                <groupId>org.apache.camel</groupId>
                <artifactId>camel-maven-plugin</artifactId>
                <configuration>
                    <applicationContextUri>META-INF/spring/*.xml</applicationContextUri>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.5.1</version>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>2.6</version>
                <configuration>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>tomcat-maven-plugin</artifactId>
                <version>1.1</version>
                <configuration>
                    <server>myTomcat</server>
                    <url>http://localhost:8081</url>
                    <path>/weatherMapping</path>
                    <!--<warFile>target/${deploy.name}.war</warFile> -->
                </configuration>
            </plugin>

            <!-- Tomcat 7 Deployment -->
            <!-- mvn tomcat7:deploy -Dserver=localhost -Dport=8080 -->
            <!--mvn tomcat7:deploy -Dserver=217.31.84.148 -Dport=8081 -->
            <plugin>
                <groupId>org.apache.tomcat.maven</groupId>
                <artifactId>tomcat7-maven-plugin</artifactId>
                <version>2.2</version>
                <configuration>
                    <url>http://${server}:${port}/manager/text</url>
                    <path>/${deploy.name}</path>
                    <update>true</update>
                    <server>tomcatserver</server>
                    <username>admin</username>
                    <password>2grExP8q3WBRIqye</password>
                    <warFile>target/${deploy.name}.war</warFile>
                    <skipTests>true</skipTests>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.codehaus.gmaven</groupId>
                <artifactId>gmaven-plugin</artifactId>
                <version>1.4</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>generateTestStubs</goal>
                            <goal>testCompile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
        <pluginManagement>
            <plugins>
                <!--This plugin's configuration is used to store Eclipse m2e settings
                    only. It has no influence on the Maven build itself. -->
                <plugin>
                    <groupId>org.eclipse.m2e</groupId>
                    <artifactId>lifecycle-mapping</artifactId>
                    <version>1.0.0</version>
                    <configuration>
                        <lifecycleMappingMetadata>
                            <pluginExecutions>
                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>
                                            org.codehaus.gmaven
                                        </groupId>
                                        <artifactId>
                                            gmaven-plugin
                                        </artifactId>
                                        <versionRange>
                                            [1.4,)
                                        </versionRange>
                                        <goals>
                                            <goal>
                                                generateTestStubs
                                            </goal>
                                            <goal>testCompile</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <ignore></ignore>
                                    </action>
                                </pluginExecution>
                            </pluginExecutions>
                        </lifecycleMappingMetadata>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>
</project>

 

WebLinks:

https://activemq.apache.org/web-console.html

http://marcelojabali.blogspot.de/2011/08/how-to-enable-activemq-web-console-on.html