Skip to content
This repository has been archived by the owner on Apr 16, 2018. It is now read-only.

Developer setup #184

Open
wilzbach opened this issue Dec 17, 2014 · 1 comment
Open

Developer setup #184

wilzbach opened this issue Dec 17, 2014 · 1 comment

Comments

@wilzbach
Copy link

Hi,

I saw that you just recently released the code for this awesome project to the general public.

It would be super if you could provide some notes for developers who want to contribute to this project..

My experience

I started to play with SMC and I thought I share my experience.

Small gotchas

  • global env variables: export SAGEMATHCLOUD=$(pwd)
  • run ./make_coffee to compile (will require global uglify-js + alias for it linking to uglifyjs2 )
  • open static/index.html
  • DB schemes: install cassandra & run cqlsh -f db_schema.cql
  • npm dependencies
npm install assert async cassandra commander crypto message net node-cassandra-cql node-uuid start-stop-daemon temp walk winston express@3.x htmlparser marked underscore cassandra-driver moment mime formidable cookies http-proxy password-hash lowe/zxcvbn nodemailer primus engine.io browserify helenus --save

My experience

1) project_server

coffee project_server.coffee

seems to work after these tiny modifications

@@ -58,2 +58,2 @@ message        = require 'message'
-misc_node      = require 'misc_node'
-misc           = require 'misc'
+misc_node      = require './misc_node'
+misc           = require './misc'
@@ -1019 +1019,2 @@ program.usage('[start/stop/restart/status] [options]')
-if program._name == 'project_server.js'
+if program._name == 'project_server.js' or program._name ==
+'project_server.coffee'

2) Other services

  • console_server: (same modifications as for project_server)
  • compute_server: (same modifications as for project_server)
  • local_hub: Everything seems also to be ok when I use the legacy express 3
  • hub: gives me unconfigured columnfamily - probably sth is wrong with my cassandra installation (coffee hub.coffee nodaemon --port 5004 --tcp_port 5005)
  • bup_server: I needed to create a file bup/conf/bup_server_id. + and insert my rootdir path line 70 (ROOTDIR = process.env['SAGEMATHCLOUD'] + '/bup')
  • storage_server: I needed a relative rootdir + two files (secrets/storage/storage_server and * data/storage/conf/compute_id)
  • sage: sage --python sage_server.py -p 6001 (I had to disable the cython magic)
  • sagenb: python2 sagenb_server.py --address 0.0.0.0 --path datadir
  • deprecated open_viewer -> should this be replaced with automatic_login?
    (* requires writeable datadir)
  • test_coffee: requires global node-sass.
    returns: "FAILURES: 17/51 assertions failed (3170ms)."
@williamstein
Copy link
Contributor

I haven't provided step-by-step instructions yet. I did just add a README.md:

https://github.com/sagemath/cloud/blob/master/README.md

Also, it's critical to look at build.py, which is a command line script that downloads and installs everything.

In theory, someday, setup will be the following:

 . salvus-env
 ./build.py --build_all
 ipython
 In [1]: import admin; reload(admin); s = admin.Services('conf/deploy_local2/')
 In [2]: s.start('all') 

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants