-
Notifications
You must be signed in to change notification settings - Fork 16
Installation
Before installation, read Prerequisites document and prepare everythig. Don't miss setting LXC up
Downloading is easy : just clone webida server repository. Since Webida server uses various npm packages, before running server, these libraries should be installed. You can run "npm install" command at the "
$ cd /home/webida
$ git clone https://github.com/webida/webida-server.git
$ cd ./src/server
$ npm install
$ sudo npm install -g webida-server-tools
In some systems, you'll find that npm install command spits warnings with connect-sqlite3, that cannot run node-pre-gyp bundled with the package.
npm WARN package.json webida-server@0.0.41 No repository field.
npm WARN package.json webida-server@0.0.41 No license field.
npm WARN installMany node-pre-gyp was bundled with sqlite3@3.1.1, but bundled package wasn't found in unpacked tree
npm WARN cannot run in wd sqlite3@3.1.1 node-pre-gyp install --fallback-to-build (wd=/home/webida/webida-server/src/server/node_modules/connect-sqlite3/node_modules/sqlite3)
When you see this error, you should install node-pre-gyp and install sqlite3 dependency manually
$ sudo npm install -g node-pre-gyp
$ cd node_modules/connect-sqlite3/node_modules/sqlite3
$ node-pre-gyp install
Following box shows directory structure cloned via git, webida-server/
/src source directory
/server server source, configuration and installation scripts
/app app unit server
/auth auth unit server (oauth2, ACL and user/group management)
/build build unit server
/buildjm build job manager unit server
/common common modules
/conf configurations
/emul emulators
/fs file system unit server
/notify notification unit server
/proxy reverse proxy unit server
/tests QUnit test scripts
/ext external(3rd party) code that supports running Webida Server
/system-configs scripts & resources to configure your system
update-system-apps.sh update system applications from the repositories for each applications.
Some directories are needed by webida user that stores log, workspace data & other stuffs.
$ su webida
(input password)
$ cd /home/webida
$ mkdir apps
$ mkdir log
$ mkdir fs
$ mkdir sessions
$ mkdir build
$ exit
Check permissions above directories that webida user has permissions to write. We recommend you to put lxc directory (where you created webida container) & webida-server (cloned git directory) directory in /home/webida, too. After creating all directories, your /home/webida directory may look like this
/webida-server server source directory
/apps apps (including system apps) deployed on this server
/fs users' workspaces
/log log files Webida server emits
/lxc LXC container configuration & root file system for Webida server
/sessions http session DB files
/build intermediate directory for app building jobs
Webida server uses src/server/conf/default-conf.js as configuration file. As the name shows, it's default configuration file. To update Webida server easily, It's better to copy the file into 'real' confiugration file, conf.js.
$ cd webida-server/src/server/conf
$ cp default-conf.js conf.js
Now you have conf.js. See Configurations guide how & what you have to do with configuration file.
** Before proceeding to next step, check your configuration file has no error or invalid paths. **
$ cd /home/webida/webida-server/src/server/conf
$ node ./conf.js
<node should exit without any exception>
Auth & FS server requires 'installation' process to initialize Database. App servers need installtion too, to install basic system apps including Webida IDE (Yes, you may want to run this app).
$ cd src/server/
$ node auth-install.js
$ node fs-install.js
$ ../../update-system-apps.sh
$ node app-install.js
** DO NOT RUN app-install.js without running update-system-apps.sh. You should also set proper deployment descriptors in conf.js **
System apps are our default HTML applications for every Webida users.
$ cd <source dir>
$ ./update-system-apps.sh
# OR
$ git submodule update --init --recursive
$ git submodule foreach git pull origin master
As other apps, system apps should be registere in DB with proper oAuth secret & redirect URL. Default system applications deployment descroptors are contained in /src/server/conf/default-conf.js. Since you've copied default-conf.js to conf.js, you shuould set proper descriptors in conf.js file. See Configuration for detail.
The app-install.js initialize app-related tables in DB & insert rows for system apps & do some optimization jobs if needed. If something goes wrong, you may want to register system-apps again from scratch. DB tables. In that case, you should run app-uninstall.sh.
$ cd /home/webida/webida-server
$ ./update-system-apps.sh
$ cd src/server
$ node app-uninstall.sh
$ node app-install.sh