Commit bf4aef15 authored by Jérome Perrin's avatar Jérome Perrin

Theia

https://www.theia-ide.org/

/reviewed-on !417
parents a19cce03 71045aef
......@@ -15,12 +15,24 @@ parts =
[nodejs]
<= nodejs-0.12
[nodejs-8.9.4]
<= nodejs-base
recipe = slapos.recipe.cmmi
version = v8.9.4
md5sum = 4ddc1daff327d7e6f63da57fdfc24f55
[nodejs-8.6.0]
<= nodejs-base
version = v8.6.0
md5sum = 0c95e08220667d8a18b97ecec8218ac6
[nodejs-base]
# Server-side Javascript.
version =
md5sum =
recipe = slapos.recipe.cmmi
version = v8.6.0
url = https://nodejs.org/dist/${:version}/node-${:version}.tar.gz
md5sum = 0c95e08220667d8a18b97ecec8218ac6
configure-options =
--shared-openssl
--shared-openssl-includes=${openssl:location}/include
......@@ -166,4 +178,4 @@ origin = https://github.com/isaacs/npm.git
git-bin = ${git:location}/bin/git
node-bin = ${nodejs-0.4:location}/bin/node
command = (GIT_SSL_NO_VERIFY=true ${:git-bin} clone --quiet ${:origin} ${:location} && cd ${:location} && ${:git-bin} reset --hard ${:commit} && ${:location}/configure --prefix=${:location} && GIT_SSL_NO_VERIFY=true ${:git-bin} submodule update --init --recursive && ${:node-bin} cli.js install npm@1.0.106 -g -f) || (rm -fr ${:location}; exit 1)
update-command =
\ No newline at end of file
update-command =
......@@ -30,7 +30,7 @@ patch-options = -p1
patches =
${:_profile_base_location_}/default_encoding.patch#4ad9664e622d5556b4c32b1d9cb587ff
url =
http://www.python.org/ftp/python/${:package_version}/Python-${:package_version}${:package_version_suffix}.tar.xz
https://www.python.org/ftp/python/${:package_version}/Python-${:package_version}${:package_version_suffix}.tar.xz
configure-options =
--enable-ipv6
--without-ensurepip
......@@ -52,3 +52,9 @@ environment =
<= python3-common
package_version = 3.5.3
md5sum = 57d1f8bfbabf4f2500273fb0706e6f21
[python3.6.6]
<= python3-common
package_version = 3.6.6
md5sum = c3f30a0aff425dda77d19e02f420d6ba
executable = @@LOCATION@@/bin/python3.6
# THIS IS NOT A BUILDOUT FILE, despite purposedly using a compatible syntax.
# The only allowed lines here are (regexes):
# - "^#" comments, copied verbatim
# - "^[" section beginings, copied verbatim
# - lines containing an "=" sign which must fit in the following categorie.
# - "^\s*filename\s*=\s*path\s*$" where "path" is relative to this file
# Copied verbatim.
# - "^\s*hashtype\s*=.*" where "hashtype" is one of the values supported
# by the re-generation script.
# Re-generated.
# - other lines are copied verbatim
# Substitution (${...:...}), extension ([buildout] extends = ...) and
# section inheritance (< = ...) are NOT supported (but you should really
# not need these here).
[instance]
filename = instance.cfg.in
md5sum = c35e6baca37c690bce39ef43825ec42b
[yarn.lock]
filename = yarn.lock
md5sum = eb30f0839ef6ce19b89757cf027e3302
[python-language-server-requirements.txt]
filename = python-language-server-requirements.txt
md5sum = c21a684783b3e746134c3505ce00b757
This diff is collapsed.
[buildout]
parts =
promises
.bashrc
frontend-reload
publish-connection-parameter
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
[frontend-instance-password]
recipe = slapos.cookbook:generate.password
username = node
bytes = 12
[frontend-instance-config]
recipe = slapos.recipe.template:jinja2
rendered = $${directory:etc}/$${:_buildout_section_name_}
template = inline:
https://$${:hostname}:$${:port} {
bind $${:ip}
tls self_signed # TODO
log stdout
errors stderr
gzip
# because caddy does not support upgrade http2 to websocket
# https://tools.ietf.org/html/rfc8441
tls {
alpn http/1.1
}
proxy / $${theia-instance:base-url} {
# transparent
}
proxy /services $${theia-instance:base-url} {
websocket
}
basicauth $${frontend-instance-password:username} $${frontend-instance-password:passwd} {
realm "Theia"
/
}
}
ip = $${instance-parameter:ipv6-random}
hostname = [$${:ip}]
port = 3001
[frontend-instance]
recipe = slapos.cookbook:wrapper
wrapper-path = $${directory:services}/$${:_buildout_section_name_}
command-line =
${caddy:output} -conf $${frontend-instance-config:rendered} -pidfile $${:pidfile}
ip = $${frontend-instance-config:ip}
hostname = $${frontend-instance-config:hostname}
port = $${frontend-instance-config:port}
pidfile = $${directory:pidfiles}/$${:_buildout_section_name_}.pid
url = https://$${frontend-instance-password:username}:$${frontend-instance-password:passwd}@$${:hostname}:$${:port}/
[frontend-reload]
recipe = slapos.cookbook:wrapper
wrapper-path = $${directory:services}/$${:_buildout_section_name_}
command-line =
${bash:location}/bin/bash -c
"kill -s USR1 $$(${coreutils:location}/bin/cat $${frontend-instance:pidfile}) \
&& ${coreutils:location}/bin/sleep infinity"
hash-files =
$${frontend-instance-config:rendered}
$${frontend-instance:wrapper-path}
wait-for-files = $${frontend-instance:pidfile}
[user]
recipe = slapos.cookbook:userinfo
[theia-instance]
recipe = slapos.cookbook:wrapper
wrapper-path = $${directory:services}/$${:_buildout_section_name_}
command-line =
env -i HOME=$${directory:home} LC_ALL=C.UTF-8 USER=$${user:pw-name} LOGNAME=$${user:pw-name} ${theia-wrapper:rendered} --hostname=$${:hostname} --port=$${:port}
ip = $${instance-parameter:ipv4-random}
hostname = $${:ip}
port = 3000
base-url = http://$${:hostname}:$${:port}/
[.bashrc]
recipe = slapos.recipe.template:jinja2
rendered = $${directory:home}/$${:_buildout_section_name_}
template = inline:
export PS1="$ " # because we are in a gowork workspace
# XXX .bash_profile is not executed, so we introduce a bashrc.theia file
# to allow customizations.
if [ -f "$HOME/.bashrc.theia" ] ; then
source $HOME/.bashrc.theia
fi
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
# enable color support
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
fi
# common ls aliases
alias ll='ls -l'
alias la='ls -A'
alias l='ls -CF'
[promises]
recipe =
instance-promises =
$${theia-listen-promise:path}
$${frontend-listen-promise:path}
[check-port-listening-promise]
recipe = slapos.cookbook:check_port_listening
path = $${directory:promises}/$${:_buildout_section_name_}
[theia-listen-promise]
<= check-port-listening-promise
hostname= $${theia-instance:ip}
port = $${theia-instance:port}
[frontend-listen-promise]
<= check-port-listening-promise
hostname= $${frontend-instance:ip}
port = $${frontend-instance:port}
[publish-connection-parameter]
recipe = slapos.cookbook:publish
url = $${frontend-instance:url}
[instance-parameter]
recipe = slapos.cookbook:slapconfiguration
computer = $${slap-connection:computer-id}
partition = $${slap-connection:partition-id}
url = $${slap-connection:server-url}
key = $${slap-connection:key-file}
cert = $${slap-connection:cert-file}
[directory]
recipe = slapos.cookbook:mkdirectory
etc = $${buildout:directory}/etc
var = $${buildout:directory}/var
srv = $${buildout:directory}/srv
bin = $${buildout:directory}/bin
tmp = $${buildout:directory}/tmp
pidfiles = $${:var}/run
services = $${:etc}/service
promises = $${:etc}/promise
framebuffer = $${:srv}/framebuffer
fonts = $${:srv}/fonts
home = $${:srv}/home
\ No newline at end of file
autopep8==1.4.2
flake8==3.6.0
future==0.16.0
jedi==0.13.1
mccabe==0.6.1
parso==0.3.1
pluggy==0.8.0
pycodestyle==2.4.0
pydocstyle==3.0.0
pyflakes==2.0.0
python-language-server==0.19.0
rope==0.11.0
six==1.11.0
snowballstemmer==1.2.1
yapf==0.24.0
[buildout]
extends =
../../component/python3/buildout.cfg
../../component/python-2.7/buildout.cfg
../../component/nodejs/buildout.cfg
../../component/caddy/buildout.cfg
../../component/git/buildout.cfg
../../component/bash/buildout.cfg
../../component/coreutils/buildout.cfg
../../stack/slapos.cfg
./gowork.cfg
./buildout.hash.cfg
# this gowork.cfg includes the one from caddy, because they share the only gowork
# workspace (not intentionnaly, as far as I see there's only one gowork per SR)
# it is included after caddy, otherwise only caddy is installed. The problem of this
# approach is that caddy's version will be the one pinned here, so we have to update
# here as well.
parts =
theia-wrapper
slapos-cookbook
instance
[nodejs]
<= nodejs-8.9.4
[python3]
<= python3.6.6
[yarn]
# this could become a component, but it needs to be invoked from nodejs explicitly,
# otherwise it uses system's nodejs
# XXX why don't we build a wrapper ?
version = 1.11.0
recipe = slapos.recipe.build:download-unpacked
url = https://github.com/yarnpkg/yarn/releases/download/v${:version}/yarn-v${:version}.tar.gz
md5sum = d4f05075f534dd9a0a8c18c650b55f0d
[python-language-server]
version = 0.19.0
recipe = plone.recipe.command
command =
bash -c "${python3:executable} -m venv ${:location} && \
. ${:location}/bin/activate && \
pip install -r ${python-language-server-requirements.txt:output}"
location = ${buildout:parts-directory}/${:_buildout_section_name_}
stop-on-error = true
[python-language-server-requirements.txt]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:parts-directory}/${:_buildout_section_name_}
mode = 0644
[theia]
recipe = plone.recipe.command
command = ${bash:location}/bin/bash -c "
export PATH=${nodejs:location}/bin/:${python2.7:location}/bin/:$PATH &&
mkdir -p ${:location} && \
cd ${:location} && \
cp ${package.json:rendered} . &&
cp ${yarn.lock:output} . &&
${yarn:location}/bin/yarn && \
${yarn:location}/bin/yarn theia build"
location = ${buildout:parts-directory}/${:_buildout_section_name_}
stop-on-error = true
[yarn.lock]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:parts-directory}/${:_buildout_section_name_}
mode = 0644
[package.json]
recipe = slapos.recipe.template:jinja2
# this comes from https://github.com/theia-ide/theia-apps/blob/598d4dc9d4f9e0514869273c069f734a41f20207/theia-full-docker/next.package.json
# but "@theia/php": "next" was removed, because we don't have php/composer component so installation failed
template =
inline:
{
"private": true,
"dependencies": {
"typescript": "latest",
"@theia/callhierarchy": "next",
"@theia/core": "next",
"@theia/cpp": "next",
"@theia/docker": "next",
"@theia/editor": "next",
"@theia/editorconfig": "next",
"@theia/extension-manager": "next",
"@theia/file-search": "next",
"@theia/filesystem": "next",
"@theia/git": "next",
"@theia/go": "next",
"@theia/java": "next",
"@theia/json": "next",
"@theia/keymaps": "next",
"@theia/languages": "next",
"@theia/markers": "next",
"@theia/merge-conflicts": "next",
"@theia/messages": "next",
"@theia/metrics": "next",
"@theia/mini-browser": "next",
"@theia/monaco": "next",
"@theia/navigator": "next",
"@theia/outline-view": "next",
"@theia/output": "next",
"@theia/plantuml": "next",
"@theia/preferences": "next",
"@theia/preview": "next",
"@theia/process": "next",
"@theia/python": "next",
"@theia/ruby": "next",
"@theia/rust": "next",
"@theia/search-in-workspace": "next",
"@theia/task": "next",
"@theia/terminal": "next",
"@theia/textmate-grammars": "next",
"@theia/tslint": "next",
"@theia/typescript": "next",
"@theia/userstorage": "next",
"@theia/variable-resolver": "next",
"@theia/workspace": "next",
"theia-yang-extension": "next"
},
"devDependencies": {
"@theia/cli": "next"
}
}
rendered = ${buildout:directory}/${:_buildout_section_name_}
mode = 0644
[gowork]
# Install go-language-server in workspace
# Note that this is the same workspace as caddy.
# install list comes from https://github.com/theia-ide/go-language-server/blob/d259749c8f263c4d845055833b03b1d2dbefa5b3/README.md#prerequisites
install +=
github.com/ramya-rao-a/go-outline
github.com/acroca/go-symbols
github.com/nsf/gocode
github.com/rogpeppe/godef
golang.org/x/tools/cmd/godoc
github.com/zmb3/gogetdoc
golang.org/x/lint/golint
github.com/fatih/gomodifytags
github.com/uudashr/gopkgs/cmd/gopkgs
golang.org/x/tools/cmd/gorename
sourcegraph.com/sqs/goreturns
github.com/cweill/gotests/...
golang.org/x/tools/cmd/guru
github.com/josharian/impl
github.com/haya14busa/goplay/cmd/goplay
github.com/davidrjenni/reftools/cmd/fillstruct
[theia-wrapper]
recipe = slapos.recipe.template:jinja2
rendered = ${buildout:bin-directory}/${:_buildout_section_name_}
mode = 0777
template =
inline:
#!/bin/bash
export PATH=${nodejs:location}/bin/:${python-language-server:location}/bin/:${bash:location}/bin/:${git:location}/bin/:$PATH
. ${gowork:env.sh}
export SHELL=bash
cd ${theia:location}
exec ${yarn:location}/bin/yarn theia start $@
[instance]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename}
mode = 0644
output = ${buildout:directory}/instance.cfg
[versions]
slapos.recipe.template = 4.3
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment