From 652c42a31c528bbd022477bcdf1106aaf2c7dbc7 Mon Sep 17 00:00:00 2001 From: Mario Loriedo Date: Fri, 10 Mar 2017 13:47:21 +0100 Subject: [PATCH] Revert "CHE-120 Workspace creation as non-privileged container. Moving instructions for '/project' dir creation and package installation from ws-agent script to Dockerfile." This reverts commit 258009930f520798e07386992d74d3eebfe53a1c. Signed-off-by: Mario Loriedo --- .../src/main/resources/stacks.json.centos | 2139 ----------------- .../openshift/client/OpenShiftConnector.java | 1 + .../org.eclipse.che.ws-agent.script.sh | 6 +- 3 files changed, 3 insertions(+), 2143 deletions(-) delete mode 100644 ide/che-core-ide-stacks/src/main/resources/stacks.json.centos diff --git a/ide/che-core-ide-stacks/src/main/resources/stacks.json.centos b/ide/che-core-ide-stacks/src/main/resources/stacks.json.centos deleted file mode 100644 index be852f39ce3..00000000000 --- a/ide/che-core-ide-stacks/src/main/resources/stacks.json.centos +++ /dev/null @@ -1,2139 +0,0 @@ -[ - { - "id": "java-mysql", - "creator": "ide", - "name": "Java-MySQL", - "description": "Multi-machine environment with Default Java Stack and MySQL database", - "scope": "general", - "tags": [ - "Java 1.8, Tomcat 8, MySQL 5.7" - ], - "components": [ - { - "name": "JDK", - "version": "1.8.0_45" - }, - { - "name": "Maven", - "version": "3.2.2" - }, - { - "name": "Tomcat", - "version": "8.0.24" - } - ], - "source": { - "type": "image", - "origin": "eclipse/ubuntu_jdk8" - }, - "workspaceConfig": { - "environments": { - "default": { - "machines": { - "dev-machine": { - "agents": [ - "org.eclipse.che.terminal", "org.eclipse.che.ws-agent", "org.eclipse.che.ssh" - ], - "servers": {}, - "attributes" : {} - }, - "db": { - "agents": [ - "org.eclipse.che.terminal" - ], - "servers": {}, - "attributes" : {} - } - }, - "recipe": { - "content": "services:\n db:\n image: mysql\n environment:\n MYSQL_ROOT_PASSWORD: password\n MYSQL_DATABASE: petclinic\n MYSQL_USER: petclinic\n MYSQL_PASSWORD: password\n mem_limit: 1073741824\n dev-machine:\n image: eclipse/ubuntu_jdk8\n mem_limit: 2147483648\n depends_on:\n - db", - "contentType": "application/x-yaml", - "type": "compose" - } - } - }, - "name": "default", - "defaultEnv": "default", - "description": null, - "commands": [ - { - "commandLine": "mysql -u $MYSQL_USER -p$MYSQL_PASSWORD -e 'show databases;'", - "name": "show databases", - "type": "custom" - } - ] - }, - "stackIcon": { - "name": "type-java-mysql.svg", - "mediaType": "image/svg+xml" - } - }, - { - "id": "java-default", - "creator": "ide", - "name": "Java", - "description": "Default Java Stack with JDK 8, Maven and Tomcat.", - "scope": "general", - "tags": [ - "Java", - "JDK", - "Maven", - "Tomcat", - "Subversion", - "Ubuntu", - "Git" - ], - "components": [ - { - "name": "JDK", - "version": "1.8.0_45" - }, - { - "name": "Maven", - "version": "3.2.2" - }, - { - "name": "Tomcat", - "version": "8.0.24" - } - ], - "source": { - "type": "image", - "origin": "eclipse/ubuntu_jdk8" - }, - "workspaceConfig": { - "environments": { - "default": { - "machines": { - "dev-machine": { - "agents": [ - "org.eclipse.che.terminal", "org.eclipse.che.ws-agent", "org.eclipse.che.ssh" - ], - "servers": {}, - "attributes" : { - "memoryLimitBytes": "2147483648" - } - } - }, - "recipe": { - "location": "eclipse/ubuntu_jdk8", - "type": "dockerimage" - } - } - }, - "name": "default", - "defaultEnv": "default", - "description": null, - "commands": [ - { - "commandLine": "mvn clean install -f ${current.project.path}", - "name": "build", - "type": "mvn" - } - ] - }, - "stackIcon": { - "name": "type-java.svg", - "mediaType": "image/svg+xml" - } - }, - { - "id": "blank-default", - "creator": "ide", - "name": "Blank", - "description": "Default Blank Stack.", - "scope": "general", - "tags": [ - "Blank", - "Ubuntu", - "Git", - "Subversion" - ], - "components": [], - "source": { - "type": "image", - "origin": "eclipse/ubuntu_jdk8" - }, - "workspaceConfig": { - "environments": { - "default": { - "machines": { - "dev-machine": { - "agents": [ - "org.eclipse.che.terminal", "org.eclipse.che.ws-agent", "org.eclipse.che.ssh" - ], - "servers": {}, - "attributes" : { - "memoryLimitBytes": "2147483648" - } - } - }, - "recipe": { - "location": "eclipse/ubuntu_jdk8", - "type": "dockerimage" - } - } - }, - "name": "default", - "defaultEnv": "default", - "description": null - }, - "stackIcon": { - "name": "type-blank.svg", - "mediaType": "image/svg+xml" - } - }, - { - "id": "android-default", - "creator": "ide", - "name": "Android", - "description": "Default Android Stack with Java 1.8, Maven 3.2.3, Android (21 api level).", - "scope": "general", - "tags": [ - "Android", - "Ubuntu", - "Git" - ], - "components": [ - { - "name": "Android", - "version": "21" - }, - { - "name": "Java", - "version": "1.8" - }, - { - "name": "Maven", - "version": "3.2.3" - } - ], - "source": { - "type": "image", - "origin": "eclipse/ubuntu_android" - }, - "workspaceConfig": { - "environments": { - "default": { - "machines": { - "dev-machine": { - "agents": [ - "org.eclipse.che.terminal", "org.eclipse.che.ws-agent", "org.eclipse.che.ssh" - ], - "servers": {}, - "attributes" : { - "memoryLimitBytes": "2147483648" - } - } - }, - "recipe": { - "location": "eclipse/ubuntu_android", - "type": "dockerimage" - } - } - }, - "name": "default", - "defaultEnv": "default", - "description": null, - "commands": [ - { - "commandLine": "mvn clean install -f ${current.project.path}", - "name": "build", - "type": "mvn" - } - ] - }, - "stackIcon": { - "name": "type-android.svg", - "mediaType": "image/svg+xml" - } - }, - { - "id": "cpp-default", - "creator": "ide", - "name": "C++", - "description": "Default C++ Stack with C++, gcc 4.8.4, GNU Make 3.81.", - "scope": "general", - "tags": [ - "C++", - "gcc", - "make", - "Ubuntu", - "Git" - ], - "components": [ - { - "name": "CPP", - "version": "4.8.4" - }, - { - "name": "gcc", - "version": "4.8.4" - }, - { - "name": "Make", - "version": "3.81" - } - ], - "source": { - "type": "image", - "origin": "eclipse/cpp_gcc" - }, - "workspaceConfig": { - "environments": { - "default": { - "machines": { - "dev-machine": { - "agents": [ - "org.eclipse.che.terminal", "org.eclipse.che.ws-agent", "org.eclipse.che.ssh" - ], - "servers": {}, - "attributes" : { - "memoryLimitBytes": "2147483648" - } - } - }, - "recipe": { - "location": "eclipse/cpp_gcc", - "type": "dockerimage" - } - } - }, - "name": "default", - "defaultEnv": "default", - "description": null, - "commands": [ - { - "name": "run", - "type": "custom", - "commandLine": "cd ${current.project.path} && make && ./a.out" - } - ] - }, - "stackIcon": { - "name": "type-cpp.svg", - "mediaType": "image/svg+xml" - } - }, - { - "id": "dotnet-default", - "creator": "ide", - "name": ".NET", - "description": "Default .NET Stack with .NET Core SDK", - "scope": "general", - "tags": [ - "Ubuntu", - "dotnet", - "Git" - ], - "components": [ - { - "name": "Ubuntu", - "version": "14.04" - }, - { - "name": ".NET Core SDK", - "version": "1.0.0-preview1-002702" - } - ], - "source": { - "type": "image", - "origin": "eclipse/dotnet_core" - }, - "workspaceConfig": { - "environments": { - "default": { - "machines": { - "dev-machine": { - "agents": [ - "org.eclipse.che.terminal", "org.eclipse.che.ws-agent", "org.eclipse.che.ssh" - ], - "servers": {}, - "attributes" : { - "memoryLimitBytes": "2147483648" - } - } - }, - "recipe": { - "location": "eclipse/dotnet_core", - "type": "dockerimage" - } - } - }, - "name": "default", - "defaultEnv": "default", - "description": null, - "commands": [ - { - "name": "update dependencies", - "type": "custom", - "commandLine": "cd ${current.project.path} && dotnet restore", - "attributes": { - "previewUrl": "" - } - }, - { - "name": "run", - "type": "custom", - "commandLine": "cd ${current.project.path} && dotnet run", - "attributes": { - "previewUrl": "http://${server.port.5000}" - } - } - ] - }, - "stackIcon": { - "name": "type-dotnet.svg", - "mediaType": "image/svg+xml" - } - }, - { - "id": "go-default", - "creator": "ide", - "name": "Go", - "description": "Default Go Stack with Go 1.6.2", - "scope": "general", - "tags": [ - "Ubuntu", - "Go" - ], - "components": [ - { - "name": "Ubuntu", - "version": "14.04" - }, - { - "name": "Go", - "version": "1.6.2" - } - ], - "source": { - "type": "image", - "origin": "eclipse/ubuntu_go" - }, - "workspaceConfig": { - "environments": { - "default": { - "machines": { - "dev-machine": { - "agents": [ - "org.eclipse.che.terminal", "org.eclipse.che.ws-agent", "org.eclipse.che.ssh" - ], - "servers": {}, - "attributes" : { - "memoryLimitBytes": "2147483648" - } - } - }, - "recipe": { - "location": "eclipse/ubuntu_go", - "type": "dockerimage" - } - } - }, - "name": "default", - "defaultEnv": "default", - "description": null, - "commands": [ - { - "name": "run", - "type": "custom", - "commandLine": "cd ${current.project.path} && go get -d && go run main.go", - "attributes": { - "previewUrl": "http://${server.port.8080}" - } - } - ] - }, - "stackIcon": { - "name": "type-go.svg", - "mediaType": "image/svg+xml" - } - }, - { - "id": "hadoop-default", - "creator": "ide", - "name": "Hadoop", - "description": "Default Hadoop Stack with JDK 8, Maven and Tomcat.", - "scope": "advanced", - "tags": [ - "Hadoop" - ], - "components": [ - { - "name": "JDK", - "version": "1.8.0_45" - }, - { - "name": "Maven", - "version": "3.2.2" - }, - { - "name": "Tomcat", - "version": "8.0.24" - }, - { - "name": "Hadoop" - } - ], - "source": { - "type": "image", - "origin": "eclipse/hadoop-dev" - }, - "workspaceConfig": { - "environments": { - "default": { - "machines": { - "dev-machine": { - "agents": [ - "org.eclipse.che.terminal", "org.eclipse.che.ws-agent", "org.eclipse.che.ssh" - ], - "servers": {}, - "attributes" : { - "memoryLimitBytes": "2147483648" - } - } - }, - "recipe": { - "location": "eclipse/hadoop-dev", - "type": "dockerimage" - } - } - }, - "name": "default", - "defaultEnv": "default", - "description": null - }, - "stackIcon": { - "name": "type-hadoop.svg", - "mediaType": "image/svg+xml" - } - }, - { - "id": "node-default", - "creator": "ide", - "name": "Node", - "description": "Default Node Stack with Node 0.12.", - "scope": "general", - "tags": [ - "Ubuntu", - "Git", - "Node.JS", - "NPM", - "Gulp", - "Bower", - "Grunt", - "Yeoman", - "Angular", - "Karma" - ], - "components": [ - { - "name": "Node.JS", - "version": "0.12.9" - }, - { - "name": "NPM", - "version": "---" - }, - { - "name": "Gulp", - "version": "---" - }, - { - "name": "Bower", - "version": "---" - }, - { - "name": "Grunt", - "version": "---" - }, - { - "name": "Yeoman", - "version": "---" - } - ], - "source": { - "type": "image", - "origin": "eclipse/node" - }, - "workspaceConfig": { - "environments": { - "default": { - "machines": { - "dev-machine": { - "agents": [ - "org.eclipse.che.terminal", "org.eclipse.che.ws-agent", "org.eclipse.che.ssh" - ], - "servers": {}, - "attributes" : { - "memoryLimitBytes": "2147483648" - } - } - }, - "recipe": { - "location": "eclipse/node", - "type": "dockerimage" - } - } - }, - "name": "default", - "defaultEnv": "default", - "description": null - }, - "stackIcon": { - "name": "type-node.svg", - "mediaType": "image/svg+xml" - } - }, - { - "id": "php-default", - "creator": "ide", - "name": "PHP", - "description": "Default PHP Stack with PHP 5.6, most popular extensions and dockerimager.", - "scope": "general", - "tags": [ - "Ubuntu", - "Git", - "PHP", - "mysql", - "sqlite", - "Apache", - "dockerimager" - ], - "components": [ - { - "name": "PHP", - "version": "5.6.24" - }, - { - "name": "Apache", - "version": "2" - }, - { - "name": "MySQL", - "version": "---" - }, - { - "name": "Sqlite", - "version": "---" - }, - { - "name": "dockerimager", - "version": "---" - } - ], - "source": { - "type": "image", - "origin": "eclipse/php" - }, - "workspaceConfig": { - "environments": { - "default": { - "machines": { - "dev-machine": { - "agents": [ - "org.eclipse.che.terminal", "org.eclipse.che.ws-agent", "org.eclipse.che.ssh", "org.eclipse.che.ls.php", "org.eclipse.che.ls.json" - ], - "servers": {}, - "attributes" : { - "memoryLimitBytes": "2147483648" - } - } - }, - "recipe": { - "location": "eclipse/php", - "type": "dockerimage" - } - } - }, - "name": "default", - "defaultEnv": "default", - "description": null, - "commands": [ - { - "name": "run php script", - "type": "custom", - "commandLine": "[ -z ${editor.current.file.path} ] && echo \"Open a PHP file in the editor before executing this command.\" || php ${editor.current.file.path}", - "attributes": { - "previewUrl": "" - } - }, - { - "name": "debug php script", - "type": "custom", - "commandLine": "[ -z ${editor.current.file.path} ] && echo \"Open a PHP file in the editor before executing this command.\" || QUERY_STRING=\"start_debug=1&debug_host=localhost&debug_port=10137\" php ${editor.current.file.path}", - "attributes": { - "previewUrl": "" - } - }, - { - "name": "start apache", - "type": "custom", - "commandLine": "sudo service apache2 start && sudo tail -f /var/log/apache2/access.log -f /var/log/apache2/error.log", - "attributes": { - "previewUrl": "http://${server.port.80}/${current.project.relpath}" - } - }, - { - "name": "stop apache", - "type": "custom", - "commandLine": "sudo service apache2 stop", - "attributes": { - "previewUrl": "" - } - }, - { - "name": "restart apache", - "type": "custom", - "commandLine": "sudo service apache2 restart", - "attributes": { - "previewUrl": "http://${server.port.80}/${current.project.relpath}" - } - } - ] - }, - "stackIcon": { - "name": "type-php.svg", - "mediaType": "image/svg+xml" - } - }, - { - "id": "python-default", - "creator": "ide", - "name": "Python", - "description": "Default Python Stack with Python 3.5.1, pip 8.1.1.", - "scope": "general", - "tags": [ - "Python 3.5", - "pip", - "Ubuntu", - "Git" - ], - "components": [ - { - "name": "Python", - "version": "3.5.1" - }, - { - "name": "pip", - "version": "8.1.1" - } - ], - "source": { - "type": "image", - "origin": "eclipse/ubuntu_python:latest" - }, - "workspaceConfig": { - "environments": { - "default": { - "machines": { - "dev-machine": { - "agents": [ - "org.eclipse.che.terminal", "org.eclipse.che.ws-agent", "org.eclipse.che.ssh" - ], - "servers": {}, - "attributes" : { - "memoryLimitBytes": "2147483648" - } - } - }, - "recipe": { - "location": "eclipse/ubuntu_python:latest", - "type": "dockerimage" - } - } - }, - "name": "default", - "defaultEnv": "default", - "description": null, - "commands": [ - { - "name": "run", - "type": "custom", - "commandLine": "cd ${current.project.path} && python main.py", - "attributes": { - "previewUrl": "" - } - } - ] - }, - "stackIcon": { - "name": "type-python.svg", - "mediaType": "image/svg+xml" - } - }, - { - "id": "rails-default", - "creator": "ide", - "name": "Rails", - "description": "Default Rails Stack with Ruby 2.3.0, Rails 4.2.6, Bundler 1.11.2.", - "scope": "general", - "tags": [ - "Ruby", - "Rails", - "Bundler", - "Ubuntu", - "Git" - ], - "components": [ - { - "name": "Ruby", - "version": "2.3.0" - }, - { - "name": "Rails", - "version": "4.2.6" - }, - { - "name": "Bundler", - "version": "1.11.2" - } - ], - "source": { - "type": "image", - "origin": "eclipse/ubuntu_rails" - }, - "workspaceConfig": { - "environments": { - "default": { - "machines": { - "dev-machine": { - "agents": [ - "org.eclipse.che.terminal", "org.eclipse.che.ws-agent", "org.eclipse.che.ssh" - ], - "servers": {}, - "attributes" : { - "memoryLimitBytes": "2147483648" - } - } - }, - "recipe": { - "location": "eclipse/ubuntu_rails", - "type": "dockerimage" - } - } - }, - "name": "default", - "defaultEnv": "default", - "description": null, - "commands": [ - { - "name": "install dependencies", - "type": "custom", - "commandLine": "cd ${current.project.path} && bundle install", - "attributes": { - "previewUrl": "" - } - }, - { - "name": "run", - "type": "custom", - "commandLine": "cd ${current.project.path} && rails server -b 0.0.0.0", - "attributes": { - "previewUrl": "http://${server.port.3000}" - } - } - ] - }, - "stackIcon": { - "name": "type-ruby.svg", - "mediaType": "image/svg+xml" - } - }, - { - "id": "debian", - "creator": "ide", - "name": "Debian", - "description": "Simple stack with Debian (Jessie).", - "scope": "advanced", - "tags": [ - "Debian" - ], - "components": [ - { - "name": "Debian", - "version": "Jessie" - } - ], - "source": { - "type": "image", - "origin": "eclipse/debian_jre" - }, - "workspaceConfig": { - "environments": { - "default": { - "machines": { - "dev-machine": { - "agents": [ - "org.eclipse.che.terminal", "org.eclipse.che.ws-agent", "org.eclipse.che.ssh" - ], - "servers": {}, - "attributes" : { - "memoryLimitBytes": "2147483648" - } - } - }, - "recipe": { - "location": "eclipse/debian_jre", - "type": "dockerimage" - } - } - }, - "name": "default", - "defaultEnv": "default", - "description": null - } - }, - { - "id": "debianlsp", - "creator": "ide", - "name": "Debian LSP", - "description": "Simple stack with Debian (Jessie) to test LSP", - "scope": "advanced", - "tags": [ - "Debian", - "LSP" - ], - "components": [ - { - "name": "Debian", - "version": "Jessie" - } - ], - "source": { - "type": "image", - "origin": "eclipse/debian_jre" - }, - "workspaceConfig": { - "environments": { - "default": { - "machines": { - "dev-machine": { - "agents": [ - "org.eclipse.che.terminal", - "org.eclipse.che.ws-agent", - "org.eclipse.che.ssh", - "org.eclipse.che.ls.csharp", - "org.eclipse.che.ls.json", - "org.eclipse.che.ls.php" - ], - "servers": {}, - "attributes" : { - "memoryLimitBytes": "2147483648" - } - } - }, - "recipe": { - "location": "eclipse/debian_jre", - "type": "dockerimage" - } - } - }, - "name": "default", - "defaultEnv": "default", - "description": null - } - }, - { - "id": "java-centos", - "creator": "ide", - "name": "Java CentOS", - "description": "Java JDK Stack on CentOS.", - "scope": "advanced", - "tags": [ - "Java", - "JDK", - "Maven", - "Tomcat", - "CentOS", - "Git" - ], - "components": [ - { - "name": "CentOS", - "version": "---" - }, - { - "name": "JDK", - "version": "1.8.0_45" - }, - { - "name": "Maven", - "version": "3.2.2" - }, - { - "name": "Tomcat", - "version": "8.0.24" - } - ], - "source": { - "type": "image", - "origin": "eclipse/centos_jdk8" - }, - "workspaceConfig": { - "environments": { - "default": { - "machines": { - "dev-machine": { - "agents": [ - "org.eclipse.che.terminal", "org.eclipse.che.ws-agent", "org.eclipse.che.ssh" - ], - "servers": {}, - "attributes" : { - "memoryLimitBytes": "2147483648" - } - } - }, - "recipe": { - "location": "eclipse/centos_jdk8", - "type": "dockerimage" - } - } - }, - "name": "default", - "defaultEnv": "default", - "description": null, - "commands": [ - { - "commandLine": "mvn clean install -f ${current.project.path}", - "name": "build", - "type": "mvn" - } - ] - }, - "stackIcon": { - "name": "type-java.svg", - "mediaType": "image/svg+xml" - } - }, - { - "id": "java-debian", - "creator": "ide", - "name": "Java Debian", - "description": "Java JDK Stack on Debian.", - "scope": "advanced", - "tags": [ - "Java", - "JDK", - "Maven", - "Tomcat", - "Debian", - "Git" - ], - "components": [ - { - "name": "Debian", - "version": "jessie" - }, - { - "name": "JDK", - "version": "1.8.0_45" - }, - { - "name": "Maven", - "version": "3.2.2" - }, - { - "name": "Tomcat", - "version": "8.0.24" - } - ], - "source": { - "type": "image", - "origin": "eclipse/debian_jdk8" - }, - "workspaceConfig": { - "environments": { - "default": { - "machines": { - "dev-machine": { - "agents": [ - "org.eclipse.che.terminal", "org.eclipse.che.ws-agent", "org.eclipse.che.ssh" - ], - "servers": {}, - "attributes" : { - "memoryLimitBytes": "2147483648" - } - } - }, - "recipe": { - "location": "eclipse/debian_jdk8", - "type": "dockerimage" - } - } - }, - "name": "default", - "defaultEnv": "default", - "description": null, - "commands": [ - { - "commandLine": "mvn clean install -f ${current.project.path}", - "name": "build", - "type": "mvn" - } - ] - }, - "stackIcon": { - "name": "type-java.svg", - "mediaType": "image/svg+xml" - } - }, - { - "id": "php-gae", - "creator": "ide", - "name": "PHP GAE", - "description": "Default PHP Stack with PHP 5.5 and PHP GAE SDK 1.9.37.", - "scope": "advanced", - "tags": [ - "PHP-GAE" - ], - "components": [ - { - "name": "PHP", - "version": "5.5.9" - }, - { - "name": "Apache", - "version": "2" - }, - { - "name": "GAE SDK", - "version": "1.9.37" - }, - { - "name": "MySQL", - "version": "---" - }, - { - "name": "Sqlite", - "version": "---" - }, - { - "name": "dockerimager", - "version": "---" - } - ], - "source": { - "type": "image", - "origin": "eclipse/php:gae" - }, - "workspaceConfig": { - "environments": { - "default": { - "machines": { - "dev-machine": { - "agents": [ - "org.eclipse.che.terminal", "org.eclipse.che.ws-agent", "org.eclipse.che.ssh", "org.eclipse.che.ls.php", "org.eclipse.che.ls.json" - ], - "servers": {}, - "attributes" : { - "memoryLimitBytes": "2147483648" - } - } - }, - "recipe": { - "location": "eclipse/php:gae", - "type": "dockerimage" - } - } - }, - "name": "default", - "defaultEnv": "default", - "description": null, - "commands": [ - { - "name": "run", - "type": "custom", - "commandLine": "cd ${GAE} && ./dev_appserver.py 2>&1 --php_executable_path=/usr/bin/php5-cgi --skip_sdk_update_check true --host=0.0.0.0 --admin_host=0.0.0.0 ${current.project.path}", - "attributes": { - "previewUrl": "http://${server.port.8080}" - } - } - ] - }, - "stackIcon": { - "name": "type-php.svg", - "mediaType": "image/svg+xml" - } - }, - { - "id": "python-2.7", - "creator": "ide", - "name": "Python 2.7", - "description": "Default Python Stack with Python 2.7.11, pip 8.1.1.", - "scope": "advanced", - "tags": [ - "Python 2.7", - "pip", - "Ubuntu", - "Git" - ], - "components": [ - { - "name": "Python", - "version": "2.7.11" - }, - { - "name": "pip", - "version": "8.1.1" - } - ], - "source": { - "type": "image", - "origin": "eclipse/ubuntu_python:2.7" - }, - "workspaceConfig": { - "environments": { - "default": { - "machines": { - "dev-machine": { - "agents": [ - "org.eclipse.che.terminal", "org.eclipse.che.ws-agent", "org.eclipse.che.ssh" - ], - "servers": {}, - "attributes" : { - "memoryLimitBytes": "2147483648" - } - } - }, - "recipe": { - "location": "eclipse/ubuntu_python:2.7", - "type": "dockerimage" - } - } - }, - "name": "default", - "defaultEnv": "default", - "description": null, - "commands": [ - { - "name": "run", - "type": "custom", - "commandLine": "cd ${current.project.path} && sudo virtualenv /env && sudo pip install -r requirements.txt && python main.py", - "attributes": { - "previewUrl": "http://${server.port.8080}" - } - } - ] - }, - "stackIcon": { - "name": "type-python.svg", - "mediaType": "image/svg+xml" - } - }, - { - "id": "python-gae", - "creator": "ide", - "name": "Python GAE", - "description": "Default Python Stack with Python 2.7, Python GAE SDK 1.9.37.", - "scope": "advanced", - "tags": [ - "Python-GAE" - ], - "components": [ - { - "name": "Python", - "version": "3.5.1" - }, - { - "name": "GAE SDK", - "version": "1.9.37" - } - ], - "source": { - "type": "image", - "origin": "eclipse/ubuntu_python:gae_python2.7" - }, - "workspaceConfig": { - "environments": { - "default": { - "machines": { - "dev-machine": { - "agents": [ - "org.eclipse.che.terminal", "org.eclipse.che.ws-agent", "org.eclipse.che.ssh" - ], - "servers": {}, - "attributes" : { - "memoryLimitBytes": "2147483648" - } - } - }, - "recipe": { - "location": "eclipse/ubuntu_python:gae_python2.7", - "type": "dockerimage" - } - } - }, - "name": "default", - "defaultEnv": "default", - "description": null, - "commands": [ - { - "name": "run", - "type": "custom", - "commandLine": "cd ${GAE} && ./dev_appserver.py 2>&1 --skip_sdk_update_check true --host=0.0.0.0 --admin_host=0.0.0.0 ${current.project.path}", - "attributes": { - "previewUrl": "http://${server.port.8080}" - } - } - ] - }, - "stackIcon": { - "name": "type-python.svg", - "mediaType": "image/svg+xml" - } - }, - { - "id": "selenium", - "creator": "ide", - "name": "Selenium", - "description": "Stack with Selenium and Chrome on Ubuntu.", - "scope": "advanced", - "tags": [ - "Selenium", - "Ubuntu", - "Chrome", - "noVNC", - "xserver", - "blackbox", - "webdriver", - "x11vnc" - ], - "components": [ - { - "name": "noVNC", - "version": "---" - }, - { - "name": "Selenium webdriver", - "version": "---" - }, - { - "name": "Google Chrome", - "version": "---" - }, - { - "name": "Blackbox", - "version": "---" - }, - { - "name": "Supervisor", - "version": "---" - } - ], - "source": { - "type": "image", - "origin": "eclipse/selenium" - }, - "workspaceConfig": { - "environments": { - "default": { - "machines": { - "dev-machine": { - "agents": [ - "org.eclipse.che.terminal", "org.eclipse.che.ws-agent", "org.eclipse.che.ssh" - ], - "servers": {}, - "attributes" : { - "memoryLimitBytes": "2147483648" - } - } - }, - "recipe": { - "location": "eclipse/selenium", - "type": "dockerimage" - } - } - }, - "name": "default", - "defaultEnv": "default", - "description": null - } - }, - { - "id": "tomee-default", - "creator": "tomitribe", - "name": "TomEE", - "description": "Default Java Stack with JDK 8, Maven and Apache TomEE 1.7.3.", - "scope": "advanced", - "tags": [ - "TomEE" - ], - "components": [ - { - "name": "JDK", - "version": "1.8.0_45" - }, - { - "name": "Maven", - "version": "3.2.2" - }, - { - "name": "TomEE", - "version": "1.7.3" - } - ], - "source": { - "type": "image", - "origin": "tomitribe/ubuntu_tomee_173_jdk8" - }, - "workspaceConfig": { - "environments": { - "default": { - "machines": { - "dev-machine": { - "agents": [ - "org.eclipse.che.terminal", "org.eclipse.che.ws-agent", "org.eclipse.che.ssh" - ], - "servers": {}, - "attributes" : { - "memoryLimitBytes": "2147483648" - } - } - }, - "recipe": { - "location": "tomitribe/ubuntu_tomee_173_jdk8", - "type": "dockerimage" - } - } - }, - "name": "default", - "defaultEnv": "default", - "description": null, - "commands": [ - { - "commandLine": "mvn clean install -f ${current.project.path}", - "name": "build", - "type": "mvn" - } - ] - }, - "stackIcon": { - "name": "type-java.svg", - "mediaType": "image/svg+xml" - } - }, - { - "id": "ubuntu", - "creator": "ide", - "name": "Ubuntu", - "description": "Simple stack with Ubuntu (latest).", - "scope": "advanced", - "tags": [ - "Ubuntu" - ], - "components": [ - { - "name": "Ubuntu", - "version": "---" - } - ], - "workspaceConfig": { - "environments": { - "default": { - "machines": { - "dev-machine": { - "agents": [ - "org.eclipse.che.terminal", "org.eclipse.che.ws-agent", "org.eclipse.che.ssh" - ], - "servers": {}, - "attributes" : { - "memoryLimitBytes": "2147483648" - } - } - }, - "recipe": { - "location": "eclipse/ubuntu_jre", - "type": "dockerimage" - } - } - }, - "name": "default", - "defaultEnv": "default", - "description": null - }, - "source": { - "type": "image", - "origin": "eclipse/ubuntu_jre" - } - }, - { - "id": "bitnami-express", - "creator": "Bitnami", - "name": "Bitnami Express", - "description": "Default Express stack with Node 7.0.0, Express 4.14.0, MongoDB 3.2.9.", - "scope": "advanced", - "tags": [ - "Express" - ], - "components": [ - { - "name": "Node.JS", - "version": "7.0.0" - }, - { - "name": "Express", - "version": "4.14.0" - }, - { - "name": "Bower", - "version": "1.7.9" - }, - { - "name": "NPM", - "version": "---" - }, - { - "name": "MongoDB", - "version": "3.2.9" - } - ], - "source": { - "type": "image", - "origin": "bitnami/che-express:4.14.0-r13" - }, - "workspaceConfig": { - "environments": { - "default": { - "machines": { - "dev-machine": { - "agents": [ - "org.eclipse.che.terminal", "org.eclipse.che.ws-agent", "org.eclipse.che.ssh" - ], - "servers": {}, - "attributes" : { - "memoryLimitBytes": "2147483648" - } - } - }, - "recipe": { - "location": "bitnami/che-express:4.14.0-r13", - "type": "dockerimage" - } - } - }, - "name": "default", - "defaultEnv": "default", - "description": null, - "commands": [] - }, - "stackIcon": { - "name": "type-bitnami.svg", - "mediaType": "image/svg+xml" - } - }, - { - "id": "bitnami-swift", - "creator": "Bitnami", - "name": "Bitnami Swift", - "description": "Default Swift stack with Swift 3.0.1", - "scope": "advanced", - "tags": [ - "Swift" - ], - "components": [ - { - "name": "Swift", - "version": "3.0.1" - } - ], - "source": { - "type": "image", - "origin": "bitnami/che-swift:3.0.1-RELEASE-r2" - }, - "workspaceConfig": { - "environments": { - "default": { - "machines": { - "dev-machine": { - "agents": [ - "org.eclipse.che.terminal", "org.eclipse.che.ws-agent", "org.eclipse.che.ssh" - ], - "servers": {}, - "attributes" : { - "memoryLimitBytes": "2147483648" - } - } - }, - "recipe": { - "location": "bitnami/che-swift:3.0.1-RELEASE-r2", - "type": "dockerimage" - } - } - }, - "name": "default", - "defaultEnv": "default", - "description": null, - "commands": [] - }, - "stackIcon": { - "name": "type-bitnami.svg", - "mediaType": "image/svg+xml" - } - }, - { - "id": "bitnami-laravel", - "creator": "Bitnami", - "name": "Bitnami Laravel", - "description": "Default Laravel stack with PHP 7.0.10, Laravel 5.2.31, MariaDB 10.1.19.", - "scope": "advanced", - "tags": [ - "Laravel" - ], - "components": [ - { - "name": "PHP", - "version": "7.0.10" - }, - { - "name": "Laravel", - "version": "5.2.31" - }, - { - "name": "MariaDB", - "version": "10.1.14" - } - ], - "source": { - "type": "image", - "origin": "bitnami/che-laravel:5.2.31-r11" - }, - "workspaceConfig": { - "environments": { - "default": { - "machines": { - "dev-machine": { - "agents": [ - "org.eclipse.che.terminal", "org.eclipse.che.ws-agent", "org.eclipse.che.ssh", "org.eclipse.che.ls.php", "org.eclipse.che.ls.json" - ], - "servers": {}, - "attributes" : { - "memoryLimitBytes": "2147483648" - } - } - }, - "recipe": { - "location": "bitnami/che-laravel:5.2.31-r11", - "type": "dockerimage" - } - } - }, - "name": "default", - "defaultEnv": "default", - "description": null, - "commands": [] - }, - "stackIcon": { - "name": "type-bitnami.svg", - "mediaType": "image/svg+xml" - } - }, - { - "id": "bitnami-rails", - "creator": "Bitnami", - "name": "Bitnami Rails", - "description": "Bitnami Rails stack with Ruby 2.3.1, Rails 5.0.0.1, MariaDB 10.1.14.", - "scope": "advanced", - "tags": [ - "BitnamiRails" - ], - "components": [ - { - "name": "Ruby", - "version": "2.3.1" - }, - { - "name": "Rails", - "version": "5.0.0.1" - }, - { - "name": "MariaDB", - "version": "10.1.14" - } - ], - "source": { - "type": "image", - "origin": "bitnami/che-rails:5.0.0.1-r5" - }, - "workspaceConfig": { - "environments": { - "default": { - "machines": { - "dev-machine": { - "agents": [ - "org.eclipse.che.terminal", "org.eclipse.che.ws-agent", "org.eclipse.che.ssh" - ], - "servers": {}, - "attributes" : { - "memoryLimitBytes": "2147483648" - } - } - }, - "recipe": { - "location": "bitnami/che-rails:5.0.0.1-r5", - "type": "dockerimage" - } - } - }, - "name": "default", - "defaultEnv": "default", - "description": null, - "commands": [] - }, - "stackIcon": { - "name": "type-bitnami.svg", - "mediaType": "image/svg+xml" - } - }, - { - "id": "bitnami-codeigniter", - "creator": "Bitnami", - "name": "Bitnami Codeigniter", - "description": "Default CodeIgniter stack with PHP 7.0.11, CodeIgniter 3.1.0, MariaDB 10.1.19.", - "scope": "advanced", - "tags": [ - "CodeIgniter" - ], - "components": [ - { - "name": "PHP", - "version": "7.0.11" - }, - { - "name": "Codeigniter", - "version": "3.1.0" - }, - { - "name": "MariaDB", - "version": "10.1.19" - } - ], - "source": { - "type": "image", - "origin": "bitnami/che-codeigniter:3.1.0-r11" - }, - "workspaceConfig": { - "environments": { - "default": { - "machines": { - "dev-machine": { - "agents": [ - "org.eclipse.che.terminal", "org.eclipse.che.ws-agent", "org.eclipse.che.ssh", "org.eclipse.che.ls.php", "org.eclipse.che.ls.json" - ], - "servers": {}, - "attributes" : { - "memoryLimitBytes": "2147483648" - } - } - }, - "recipe": { - "location": "bitnami/che-codeigniter:3.1.0-r11", - "type": "dockerimage" - } - } - }, - "name": "default", - "defaultEnv": "default", - "description": null, - "commands": [] - }, - "stackIcon": { - "name": "type-bitnami.svg", - "mediaType": "image/svg+xml" - } - }, - { - "id": "bitnami-symfony", - "creator": "Bitnami", - "name": "Bitnami Symfony", - "description": "Default Symfony stack with PHP 7.0.11, Symfony 3.1.3, MariaDB 10.1.19.", - "scope": "advanced", - "tags": [ - "Symfony" - ], - "components": [ - { - "name": "PHP", - "version": "7.0.11" - }, - { - "name": "Symfony", - "version": "3.1.3" - }, - { - "name": "MariaDB", - "version": "10.1.19" - } - ], - "source": { - "type": "image", - "origin": "bitnami/che-symfony:3.1.3-r8" - }, - "workspaceConfig": { - "environments": { - "default": { - "machines": { - "dev-machine": { - "agents": [ - "org.eclipse.che.terminal", "org.eclipse.che.ws-agent", "org.eclipse.che.ssh", "org.eclipse.che.ls.php", "org.eclipse.che.ls.json" - ], - "servers": {}, - "attributes" : { - "memoryLimitBytes": "2147483648" - } - } - }, - "recipe": { - "location": "bitnami/che-symfony:3.1.3-r8", - "type": "dockerimage" - } - } - }, - "name": "default", - "defaultEnv": "default", - "description": null, - "commands": [] - }, - "stackIcon": { - "name": "type-bitnami.svg", - "mediaType": "image/svg+xml" - } - }, - { - "id": "bitnami-java-play", - "creator": "Bitnami", - "name": "Bitnami Play for Java", - "description": "Default Play stack with OpenJDK 1.8.0 and Play 1.3.10.", - "scope": "advanced", - "tags": [ - "Play" - ], - "components": [ - { - "name": "OpenJDK", - "version": "1.8.0" - }, - { - "name": "Play", - "version": "2.55" - }, - { - "name": "Activator", - "version": "1.13.10" - } - ], - "source": { - "type": "image", - "origin": "bitnami/che-java-play:1.3.10-r6" - }, - "workspaceConfig": { - "environments": { - "default": { - "machines": { - "dev-machine": { - "agents": [ - "org.eclipse.che.terminal", "org.eclipse.che.ws-agent", "org.eclipse.che.ssh" - ], - "servers": {}, - "attributes" : { - "memoryLimitBytes": "2147483648" - } - } - }, - "recipe": { - "location": "bitnami/che-java-play:1.3.10-r6", - "type": "dockerimage" - } - } - }, - "name": "default", - "defaultEnv": "default", - "description": null, - "commands": [] - }, - "stackIcon": { - "name": "type-bitnami.svg", - "mediaType": "image/svg+xml" - } - }, - { - "id": "zend", - "creator": "ide", - "name": "Zend", - "description": "Zend stack with PHP 7, Zend Server 9 and Z-Ray.", - "scope": "advanced", - "tags": [ - "PHP", - "Zend", - "Z-Ray", - "Composer", - "Ubuntu", - "Git" - ], - "components": [ - { - "name": "PHP", - "version": "7.0.11" - }, - { - "name": "Zend Server", - "version": "9.0.1" - }, - { - "name": "Composer", - "version": "---" - } - ], - "source": { - "type": "image", - "origin": "kaloyanraev/che-zendserver" - }, - "workspaceConfig": { - "environments": { - "default": { - "machines": { - "dev-machine": { - "agents": [ - "org.eclipse.che.terminal", "org.eclipse.che.ws-agent", "org.eclipse.che.ssh", "org.eclipse.che.ls.php", "org.eclipse.che.ls.json" - ], - "servers": {}, - "attributes" : { - "memoryLimitBytes": "2147483648" - } - } - }, - "recipe": { - "location": "kaloyanraev/che-zendserver", - "type": "dockerimage" - } - } - }, - "name": "default", - "defaultEnv": "default", - "description": null, - "commands": [ - { - "name": "run php script", - "type": "custom", - "commandLine": "[ -z ${editor.current.file.path} ] && echo \"Open a PHP file in the editor before executing this command.\" || php ${editor.current.file.path}", - "attributes": { - "previewUrl": "" - } - }, - { - "name": "debug php script", - "type": "custom", - "commandLine": "[ -z ${editor.current.file.path} ] && echo \"Open a PHP file in the editor before executing this command.\" || QUERY_STRING=\"start_debug=1&debug_host=localhost&debug_port=10137\" php ${editor.current.file.path}", - "attributes": { - "previewUrl": "" - } - }, - { - "name": "restart zend server", - "type": "custom", - "commandLine": "sudo sqlite3 /usr/local/zend/var/db/zsd.db \"UPDATE ZSD_DIRECTIVES SET DISK_VALUE='http://${server.port.10081}/ZendServer' WHERE NAME='zray.zendserver_ui_url'\" && sudo sed -i 's#zray.zendserver_ui_url=.*#zray.zendserver_ui_url=http://${server.port.10081}/ZendServer#g' /usr/local/zend/etc/conf.d/zray.ini && sudo /usr/local/zend/bin/zendctl.sh restart", - "attributes": { - "previewUrl": "http://${server.port.80}" - } - }, - { - "name": "stop zend server", - "type": "custom", - "commandLine": "sudo /usr/local/zend/bin/zendctl.sh stop", - "attributes": { - "previewUrl": "" - } - }, - { - "name": "show admin password", - "type": "custom", - "commandLine": "echo \"Zend Server admin password is `sudo cat /root/zend-password`\"", - "attributes": { - "previewUrl": "http://${server.port.10081}" - } - } - ] - }, - "stackIcon": { - "name": "type-zend.svg", - "mediaType": "image/svg+xml" - } - }, - { - "id": "platformio", - "creator": "ide", - "name": "PlatformIO", - "description": "Stack for IoT development", - "scope": "general", - "tags": [ - "PlatformIO", - "IoT", - "embedded", - "arduino", - "mbed" - ], - "components": [ - { - "name": "Python", - "version": "2.7" - }, - { - "name": "pip", - "version": "8.1.1" - }, - { - "name": "PlatformIO", - "version": "3.2.0" - } - ], - "source": { - "type": "image", - "origin": "code/pio:latest" - }, - "workspaceConfig": { - "environments": { - "default": { - "machines": { - "dev-machine": { - "agents": [ - "org.eclipse.che.terminal", "org.eclipse.che.ws-agent", "org.eclipse.che.ssh" - ], - "servers": {}, - "attributes" : { - "memoryLimitBytes": "2147483648", - "auto_snapshot": "true", - "auto_restore": "true" - - } - } - }, - "recipe": { - "location": "eclipse/platformio:latest", - "type": "dockerimage" - } - } - }, - "name": "default", - "defaultEnv": "default", - "description": null, - "commands": [ - { - "name": "run", - "type": "custom", - "commandLine": "pio run -d ${current.project.path}", - "attributes": { - "previewUrl": "" - } - }, - { - "name": "upload", - "type": "custom", - "commandLine": "pio run -d ${current.project.path} -t upload", - "attributes": { - "previewUrl": "" - } - }, - { - "name": "clean", - "type": "custom", - "commandLine": "pio run -d ${current.project.path} -t clean", - "attributes": { - "previewUrl": "" - } - }, - { - "name": "Remote: Device list", - "type": "custom", - "commandLine": "pio remote device list", - "attributes": { - "previewUrl": "" - } - }, - { - "name": "Remote: Upload", - "type": "custom", - "commandLine": "pio remote run -d ${current.project.path} -t upload", - "attributes": { - "previewUrl": "" - } - } - ] - }, - "stackIcon": { - "name": "type-python.svg", - "mediaType": "image/svg+xml" - } - }, - { - "id": "vert.x", - "creator": "Clement Escoffier", - "name": "Eclipse Vert.x", - "description": "Eclipse Vert.x Stack on CentOS.", - "scope": "advanced", - "tags": [ - "Java", - "JDK", - "Maven", - "Vert.x", - "CentOS", - "Git" - ], - "components": [{ - "name": "CentOS", - "version": "---" - }, { - "name": "JDK", - "version": "1.8.0_45" - }, { - "name": "Maven", - "version": "3.2.2" - }], - "source": { - "type": "image", - "origin": "rhche/vertx" - }, - "workspaceConfig": { - "environments": { - "default": { - "machines": { - "dev-machine": { - "agents": [ - "org.eclipse.che.terminal", - "org.eclipse.che.ws-agent", - "org.eclipse.che.ssh" - ], - "servers": {}, - "attributes": { - "memoryLimitBytes": "2147483648" - } - } - }, - "recipe": { - "location": "rhche/vertx", - "type": "dockerimage" - } - } - }, - "name": "default", - "defaultEnv": "default", - "description": null, - "commands": [{ - "commandLine": "scl enable rh-maven33 'mvn clean install -f ${current.project.path}'", - "name": "build", - "type": "mvn" - }, { - "commandLine": "cd ${current.project.path} && scl enable rh-maven33 'java -jar target/*-fat.jar'", - "name": "run", - "type": "custom", - "attributes": { - "previewUrl": "http://${server.port.8080}" - } - }] - }, - "stackIcon": { - "name": "type-java.svg", - "mediaType": "image/svg+xml" - } - } -] diff --git a/plugins/plugin-docker/che-plugin-openshift-client/src/main/java/org/eclipse/che/plugin/openshift/client/OpenShiftConnector.java b/plugins/plugin-docker/che-plugin-openshift-client/src/main/java/org/eclipse/che/plugin/openshift/client/OpenShiftConnector.java index 44ba16a4cab..2e65bdb4773 100644 --- a/plugins/plugin-docker/che-plugin-openshift-client/src/main/java/org/eclipse/che/plugin/openshift/client/OpenShiftConnector.java +++ b/plugins/plugin-docker/che-plugin-openshift-client/src/main/java/org/eclipse/che/plugin/openshift/client/OpenShiftConnector.java @@ -921,6 +921,7 @@ private String createOpenShiftDeployment(String workspaceID, .withImagePullPolicy(OPENSHIFT_IMAGE_PULL_POLICY_IFNOTPRESENT) .withNewSecurityContext() .withRunAsUser(UID) + .withPrivileged(true) .endSecurityContext() .withLivenessProbe(getLivenessProbeFrom(exposedPorts)) .withVolumeMounts(getVolumeMountsFrom(volumes, workspaceID)) diff --git a/wsagent/agent/src/main/resources/org.eclipse.che.ws-agent.script.sh b/wsagent/agent/src/main/resources/org.eclipse.che.ws-agent.script.sh index 2af91e61983..935e21bb832 100644 --- a/wsagent/agent/src/main/resources/org.eclipse.che.ws-agent.script.sh +++ b/wsagent/agent/src/main/resources/org.eclipse.che.ws-agent.script.sh @@ -34,11 +34,9 @@ fi MACHINE_TYPE=$(uname -m) mkdir -p ${CHE_DIR} +${SUDO} mkdir -p /projects +${SUDO} sh -c "chown -R $(id -u -n) /projects" -if [ ! -d "/projects" ]; then - ${SUDO} mkdir -p /projects - ${SUDO} sh -c "chown -R $(id -u -n) /projects" -fi INSTALL_JDK=false command -v ${JAVA_HOME}/bin/java >/dev/null 2>&1 || {