-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CHE-4098: separate terminal and exec agents (#4486)
Refactor golang terminal code. Add ping frames into terminal websocket connection. Signed-off-by: Alexander Garagatyi <[email protected]>
- Loading branch information
Alexander Garagatyi
authored
Mar 27, 2017
1 parent
6f97130
commit 798ca08
Showing
80 changed files
with
2,790 additions
and
889 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,192 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
Copyright (c) 2012-2017 Codenvy, S.A. | ||
All rights reserved. This program and the accompanying materials | ||
are made available under the terms of the Eclipse Public License v1.0 | ||
which accompanies this distribution, and is available at | ||
http://www.eclipse.org/legal/epl-v10.html | ||
Contributors: | ||
Codenvy, S.A. - initial API and implementation | ||
--> | ||
<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/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<artifactId>che-agents-parent</artifactId> | ||
<groupId>org.eclipse.che</groupId> | ||
<version>5.6.0-SNAPSHOT</version> | ||
</parent> | ||
<artifactId>exec-agent</artifactId> | ||
<name>Agent :: Exec</name> | ||
<dependencies> | ||
<dependency> | ||
<groupId>com.google.inject</groupId> | ||
<artifactId>guice</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>javax.inject</groupId> | ||
<artifactId>javax.inject</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.eclipse.che.core</groupId> | ||
<artifactId>che-core-api-agent</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.eclipse.che.core</groupId> | ||
<artifactId>che-core-api-agent-shared</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.eclipse.che.core</groupId> | ||
<artifactId>che-core-api-core</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.eclipse.che.core</groupId> | ||
<artifactId>che-core-api-machine</artifactId> | ||
</dependency> | ||
</dependencies> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-antrun-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>copy-sources</id> | ||
<phase>compile</phase> | ||
<goals> | ||
<goal>run</goal> | ||
</goals> | ||
<configuration> | ||
<target> | ||
<!--To not use godep tool vendored dependencies are copied into correct place of GOPATH | ||
by maven--> | ||
<copy todir="${project.build.directory}/go-workspace/src"> | ||
<fileset dir="${basedir}/../go-agents/src/main/go/vendor/" includes="**/*" /> | ||
</copy> | ||
<copy todir="${project.build.directory}/go-workspace/src/github.com/eclipse/che/agents/go-agents/src/main/go"> | ||
<fileset dir="${basedir}/../go-agents/src/main/go/" excludes="vendor/" includes="**/*.*go" /> | ||
</copy> | ||
</target> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>com.soebes.maven.plugins</groupId> | ||
<artifactId>iterator-maven-plugin</artifactId> | ||
<version>0.5.0</version> | ||
<executions> | ||
<execution> | ||
<id>compile-go-agents</id> | ||
<phase>compile</phase> | ||
<goals> | ||
<goal>iterator</goal> | ||
</goals> | ||
<configuration> | ||
<itemsWithProperties> | ||
<itemWithProperty> | ||
<name>linux_arm5</name> | ||
<properties> | ||
<go.target.os>linux</go.target.os> | ||
<go.target.architecture>arm</go.target.architecture> | ||
<go.target.arm.version>5</go.target.arm.version> | ||
</properties> | ||
</itemWithProperty> | ||
<itemWithProperty> | ||
<name>linux_arm6</name> | ||
<properties> | ||
<go.target.os>linux</go.target.os> | ||
<go.target.architecture>arm</go.target.architecture> | ||
<go.target.arm.version>6</go.target.arm.version> | ||
</properties> | ||
</itemWithProperty> | ||
<itemWithProperty> | ||
<name>linux_arm7</name> | ||
<properties> | ||
<go.target.os>linux</go.target.os> | ||
<go.target.architecture>arm</go.target.architecture> | ||
<go.target.arm.version>7</go.target.arm.version> | ||
</properties> | ||
</itemWithProperty> | ||
<itemWithProperty> | ||
<name>linux_amd64</name> | ||
<properties> | ||
<go.target.os>linux</go.target.os> | ||
<go.target.architecture>amd64</go.target.architecture> | ||
</properties> | ||
</itemWithProperty> | ||
<itemWithProperty> | ||
<name>linux_i386</name> | ||
<properties> | ||
<go.target.os>linux</go.target.os> | ||
<go.target.architecture>386</go.target.architecture> | ||
</properties> | ||
</itemWithProperty> | ||
</itemsWithProperties> | ||
<pluginExecutors> | ||
<pluginExecutor> | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>exec-maven-plugin</artifactId> | ||
</plugin> | ||
<goal>exec</goal> | ||
<configuration> | ||
<executable>go</executable> | ||
<workingDirectory>${project.build.directory}/go-workspace/src/github.com/eclipse/che/agents/go-agents/src/main/go/exec-agent</workingDirectory> | ||
<arguments> | ||
<argument>build</argument> | ||
<argument>-a</argument> | ||
<argument>-installsuffix</argument> | ||
<argument>cgo</argument> | ||
<argument>-o</argument> | ||
<argument>${project.build.directory}/${item}/che-exec-agent</argument> | ||
</arguments> | ||
<environmentVariables> | ||
<CGO_ENABLED>0</CGO_ENABLED> | ||
<GOPATH>${project.build.directory}/go-workspace</GOPATH> | ||
<GOOS>${go.target.os}</GOOS> | ||
<GOARCH>${go.target.architecture}</GOARCH> | ||
<GOARM>${go.target.arm.version}</GOARM> | ||
</environmentVariables> | ||
</configuration> | ||
</pluginExecutor> | ||
</pluginExecutors> | ||
</configuration> | ||
</execution> | ||
<execution> | ||
<id>assembly</id> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>iterator</goal> | ||
</goals> | ||
<configuration> | ||
<items> | ||
<item>linux_arm5</item> | ||
<item>linux_arm6</item> | ||
<item>linux_arm7</item> | ||
<item>linux_amd64</item> | ||
<item>linux_i386</item> | ||
</items> | ||
<pluginExecutors> | ||
<pluginExecutor> | ||
<plugin> | ||
<artifactId>maven-assembly-plugin</artifactId> | ||
</plugin> | ||
<goal>single</goal> | ||
<configuration> | ||
<tarLongFileMode>posix</tarLongFileMode> | ||
<descriptors> | ||
<descriptor>${basedir}/src/assembly/assembly.xml</descriptor> | ||
</descriptors> | ||
</configuration> | ||
</pluginExecutor> | ||
</pluginExecutors> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<!-- | ||
Copyright (c) 2012-2017 Codenvy, S.A. | ||
All rights reserved. This program and the accompanying materials | ||
are made available under the terms of the Eclipse Public License v1.0 | ||
which accompanies this distribution, and is available at | ||
http://www.eclipse.org/legal/epl-v10.html | ||
Contributors: | ||
Codenvy, S.A. - initial API and implementation | ||
--> | ||
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd"> | ||
<id>${item}</id> | ||
<includeBaseDirectory>true</includeBaseDirectory> | ||
<baseDirectory>exec-agent</baseDirectory> | ||
<formats> | ||
<format>zip</format> | ||
<format>tar.gz</format> | ||
</formats> | ||
<fileSets> | ||
<fileSet> | ||
<directory>${project.build.directory}/${item}</directory> | ||
<includes> | ||
<include>che-exec-agent</include> | ||
</includes> | ||
<fileMode>0755</fileMode> | ||
<outputDirectory></outputDirectory> | ||
</fileSet> | ||
</fileSets> | ||
</assembly> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"id": "org.eclipse.che.exec", | ||
"name": "Exec-agent", | ||
"description": "Agent for command execution", | ||
"dependencies": [], | ||
"properties": {}, | ||
"servers": { | ||
"exec-agent": { | ||
"port": "4412/tcp", | ||
"protocol": "http" | ||
} | ||
} | ||
} |
Oops, something went wrong.