Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Give one liner install. #51

Closed
cirosantilli opened this issue Feb 25, 2014 · 29 comments
Closed

Give one liner install. #51

cirosantilli opened this issue Feb 25, 2014 · 29 comments

Comments

@cirosantilli
Copy link
Contributor

Give new developers a one liner copy paste that will correctly install sharelatex in many Linux distros with little effort from our part, greatly reducing entry cost (for a new nodejs user like me it took about 5 hours to get dev running).

For Redis and MongoDB, Chef provisioning is already configured for many distros at:

No OSX support there though. We could check Puppet to see their coverage.

A not so stable looking TexLive 20XX recipe here. I could improve this, since it is a central part of our system, and TexLive 2013 is a pain to install in Ubuntu 12.04. This is the hardest point of this feature.

nvm already seems to have a distro independent install, so we may not even bother making a recipe. I would recommend adding to our "one liner" something like:

cd sharelatex_root
NODE_VERSION="$(cat .nvmrc)"
if ! nvm; then
  curl https://raw.github.com/creationix/nvm/master/install.sh | sh
  echo "
  # Added by sharelatex
  source ~/.nvm/nvm.sh
  nvm use "$NODE_VERSION" &>/dev/null
  " >> ~/.bashrc
fi
nvm install "$NODE_VERSION"
@jpallen
Copy link
Contributor

jpallen commented Feb 25, 2014

I think a one liner install script is great to install the ShareLateX part
of the system, but I'd be pretty surprised if it tried to install things
like redis and mongodb as well. An install script like that shouldn't touch
anything outside of the directory it is installing into IMO.

However, we could definitely have a second script/system which is
explicitly for the purpose of installing the required dependencies. To
start, I think it might be enough just to have a Wiki page with
instructions on how to install redis, mongodb and texlive 2013 into Ubuntu
12.04, Mac OS X, etc, since it's only a few commands for each one, and some
may already be installed.

On Tue, Feb 25, 2014 at 11:10 AM, Ciro Santilli notifications@github.comwrote:

Give new developers a one liner copy paste that will correctly install
sharelatex in many Linux distros with little effort from our part, greatly
reducing entry cost (for a new nodejs user like me it took about 5 hours to
get dev running).

For Redis and MongoDB, Chef provisioning is already configured for many
distros at:

No OSX support there though. We could check Puppet to see their coverage.

A not so stable looking TexLive 20XX recipe herehttp://community.opscode.com/cookbooks/texlive.
I could improve this, since it is a central part of our system, and TexLive
2013 is a pain to install in Ubuntu 12.04. This is the hardest point of
this feature.

nvm already seems to have a distro independent install, so we may not
even bother making a recipe. I would recommend adding to our "one liner"
something like:

cd sharelatex_root
NODE_VERSION="$(cat .nvmrc)"
if ! nvm; then
curl https://raw.github.com/creationix/nvm/master/install.sh | sh
echo "

Added by sharelatex

source ~/.nvm/nvm.sh
nvm use "$NODE_VERSION" &>/dev/null
" >> ~/.bashrc
fi
nvm install "$NODE_VERSION"

Reply to this email directly or view it on GitHubhttps://github.com//issues/51
.

@henryoswald
Copy link
Contributor

are we going to start off early and say we don't support windows? Node does run well on windows, however it could be a bugger to support another platform. (I can say this as I used to be a .NET dev)

@cirosantilli
Copy link
Contributor Author

Instead of blacklisting, lets whitelist: we support MacOS / Ubuntu 12.04 ...

If the community requests another one, we can start by letting people create wiki pages. If they request a lot we can look into it ourselves.

@cirosantilli
Copy link
Contributor Author

@jpallen I don't think it is a problem if the script tries to install global things because:

  • users are going to have to install them anyways
  • the script would never uninstall anything: it would fail gracefully / skip some steps and explain why

so we are just making it easier for the developer without any data loss risks.

@palkan
Copy link
Contributor

palkan commented Feb 25, 2014

What about Vagrant + shell/ansible/chef provisioning? Kinda cross-platform solution)

@cirosantilli
Copy link
Contributor Author

When I hacked GitLab, Vagrant was prohibitively slow for my computer (4 Gb RAM, core i3, HDD). Might be OK for this project however. Someone would need to test it first.

@henryoswald
Copy link
Contributor

I am hesitant to start adding other decencies to help with setup, I think the current grunt file is really good at doing a quick sanity check. There is also a difference we need to distinguish between building environments for development or deployment. Adding chef/vagrant/puppet etc into our repo is another thing we need to support and think about. If we get a lot of people complaining how hard it is to setup then I think we either look at why it is hard to setup or look at these solutions.

@henryoswald
Copy link
Contributor

@cirosantilli what issues did you hit when setting up?

@cirosantilli
Copy link
Contributor Author

To tell the truth, I am not yet set up, probably because of missing mongo / redis. I will check it out.

Otherwise, every one of them =) (disclaimer: first node project here... more experienced noders might not have problems).

@jpallen
Copy link
Contributor

jpallen commented Feb 25, 2014

Are you installing onto Ubuntu 12.04? Would you mind documenting some of
the steps you've taken to get ShareLaTeX set up? I've set up a Wiki page:
https://github.com/sharelatex/sharelatex/wiki/Installation-instructions-for-Ubuntu-12.04

On Tue, Feb 25, 2014 at 12:30 PM, Ciro Santilli notifications@github.comwrote:

To tell the truth, I am not yet set up, probably because of missing mongo
/ redis. I will check it out.

Otherwise, every one of them =) (disclaimer: first node project here...
more experienced noders might not have problems).

Reply to this email directly or view it on GitHubhttps://github.com//issues/51#issuecomment-36002500
.

@cirosantilli
Copy link
Contributor Author

Thats a goog initiative. Yup I'm on 12.04.

@laszewsk
Copy link

I have worked on a Vagarnt installer for precise64 an precise 32. However, I am a bit stuck as I ran into some issues. The installer is pretty simple, and I think I got most of the requirements done, however some thing is not right that seem not to start up the server properly. Are there some people that would like to look at this and improve on what I have done? How should we proceed? Do you want in some form to add a vagrant install folder with the vagrant file so the community can contribute. As this requires some discussion I thought I do not make a clone and put just a folder in before a decission is made that this is useful. In the meanwhile I have put up the not working Vagrant file at

https://github.com/laszewsk/vagrant-sharelatex/tree/master/sharelatex

@jpallen
Copy link
Contributor

jpallen commented Feb 26, 2014

@laszewsk It looks like you're checking out the ShareLaTeX repo, but not running any of the install commands or running the server. You'll also need to forward port 3000 from within Vagrant if you want to access it on the host machine.

@laszewsk
Copy link

I just updated my latest Vagrant script. The one previously was an older version and I forgot to push the new one. I also added a readme

@jpallen
Copy link
Contributor

jpallen commented Feb 26, 2014

You're not running grunt run in the install script. It's currently
commented out.

On Wed, Feb 26, 2014 at 10:04 AM, Gregor von Laszewski <
notifications@github.com> wrote:

I just updated my latest Vagrant script. The one previously was an older
version and I forgot to push the new one. I also added a readme

Reply to this email directly or view it on GitHubhttps://github.com//issues/51#issuecomment-36109489
.

@laszewsk
Copy link

i did log into the machine and run it by hand ;-)
The reason my script did not work is that I copied the coffee file to late. I fixed that now and the Install vagrant script seems to at least be able to get the web server up and running.

Now what is the next step? E.g. I see on localhost:3000 the web gui but did not yet have the time to look into what my username and password is or how I should supply this ...

@jpallen
Copy link
Contributor

jpallen commented Feb 26, 2014

Sorry, just wanted to check the obvious :). You need to register for the
local version as well to set up a user in the database.

On Wed, Feb 26, 2014 at 11:05 AM, Gregor von Laszewski <
notifications@github.com> wrote:

i did log into the machine and run it by hand ;-)
The reason my script did not work is that I copied the coffee file to
late. I fixed that now and the Install vagrant script seems to at least be
able to get the web server up and running.

Now what is the next step? E.g. I see on localhost:3000 the web gui but
did not yet have the time to look into what my username and password is or
how I should supply this ...

Reply to this email directly or view it on GitHubhttps://github.com//issues/51#issuecomment-36114051
.

@laszewsk
Copy link

When I register me I get an error such as, thus I think something is wrong with the redis configuration?

{"name":"web-sharelatex","hostname":"precise64","pid":17978,"level":50,"err":{"message":"Forbidden","name":"Error","stack":"Error: Forbidden\n at Object.exports.error (/tmp/b/redis-2.6.9/sharelatex/web/node_modules/express/node_modules/connect/lib/utils.js:62:13)\n at /tmp/b/redis-2.6.9/sharelatex/web/node_modules/express/node_modules/connect/lib/middleware/csrf.js:55:41\n at Object.handle (/tmp/b/redis-2.6.9/sharelatex/web/app/js/infrastructure/Server.js:97:14)\n at next (/tmp/b/redis-2.6.9/sharelatex/web/node_modules/express/node_modules/connect/lib/proto.js:190:15)\n at Object.handle (/tmp/b/redis-2.6.9/sharelatex/web/app/js/infrastructure/Server.js:87:14)\n at next (/tmp/b/redis-2.6.9/sharelatex/web/node_modules/express/node_modules/connect/lib/proto.js:190:15)\n at next (/tmp/b/redis-2.6.9/sharelatex/web/node_modules/express/node_modules/connect/lib/middleware/session.js:312:9)\n at /tmp/b/redis-2.6.9/sharelatex/web/node_modules/express/node_modules/connect/lib/middleware/session.js:329:9\n at /tmp/b/redis-2.6.9/sharelatex/web/node_modules/connect-redis/lib/connect-redis.js:93:25\n at try_callback (/tmp/b/redis-2.6.9/sharelatex/web/node_modules/connect-redis/node_modules/redis/index.js:522:9)\n at RedisClient.return_reply (/tmp/b/redis-2.6.9/sharelatex/web/node_modules/connect-redis/node_modules/redis/index.js:592:13)\n at RedisReplyParser. (/tmp/b/redis-2.6.9/sharelatex/web/node_modules/connect-redis/node_modules/redis/index.js:265:14)\n at RedisReplyParser.EventEmitter.emit (events.js:95:17)\n at RedisReplyParser.send_reply (/tmp/b/redis-2.6.9/sharelatex/web/node_modules/connect-redis/node_modules/redis/lib/parser/javascript.js:281:18)\n at RedisReplyParser.execute (/tmp/b/redis-2.6.9/sharelatex/web/node_modules/connect-redis/node_modules/redis/lib/parser/javascript.js:188:26)\n at RedisClient.on_data (/tmp/b/redis-2.6.9/sharelatex/web/node_modules/connect-redis/node_modules/redis/index.js:478:27)\n at Socket. (/tmp/b/redis-2.6.9/sharelatex/web/node_modules/connect-redis/node_modules/redis/index.js:79:14)\n at Socket.EventEmitter.emit (events.js:95:17)\n at Socket. (stream_readable.js:746:14)\n at Socket.EventEmitter.emit (events.js:92:17)\n at emitReadable (_stream_readable.js:408:10)\n at emitReadable (_stream_readable.js:404:5)\n at readableAddChunk (_stream_readable.js:165:9)\n at Socket.Readable.push (_stream_readable.js:127:10)\n at TCP.onread (net.js:528:21)","status":403},"msg":"","time":"2014-02-26T11:36:58.757Z","v":0}
Error: MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabled. Please check Redis logs for details about the error.
at RedisReplyParser. (/tmp/b/redis-2.6.9/sharelatex/web/node_modules/connect-redis/node_modules/redis/index.js:262:27)
at RedisReplyParser.EventEmitter.emit (events.js:95:17)
at RedisReplyParser.send_error (/tmp/b/redis-2.6.9/sharelatex/web/node_modules/connect-redis/node_modules/redis/lib/parser/javascript.js:266:14)
at RedisReplyParser.execute (/tmp/b/redis-2.6.9/sharelatex/web/node_modules/connect-redis/node_modules/redis/lib/parser/javascript.js:125:22)
at RedisClient.on_data (/tmp/b/redis-2.6.9/sharelatex/web/node_modules/connect-redis/node_modules/redis/index.js:478:27)
at Socket. (/tmp/b/redis-2.6.9/sharelatex/web/node_modules/connect-redis/node_modules/redis/index.js:79:14)
at Socket.EventEmitter.emit (events.js:95:17)
at Socket. (stream_readable.js:746:14)
at Socket.EventEmitter.emit (events.js:92:17)
at emitReadable
(_stream_readable.js:408:10)
at emitReadable (_stream_readable.js:404:5)
at readableAddChunk (_stream_readable.js:165:9)
at Socket.Readable.push (_stream_readable.js:127:10)
at TCP.onread (net.js:528:21)

@jpallen
Copy link
Contributor

jpallen commented Feb 26, 2014

They key line is: 'Error: MISCONF Redis is configured to save RDB
snapshots, but is currently not able to persist on disk. Commands that may
modify the data set are disabled. Please check Redis logs for details about
the error.'

I don't know what's causing this, but the answer probably lies in the Redis
settings file or the online documentation.

On Wed, Feb 26, 2014 at 11:39 AM, Gregor von Laszewski <
notifications@github.com> wrote:

When I register me I get an error such as, thus I think something is wrong
with the redis configuration?

{"name":"web-sharelatex","hostname":"precise64","pid":17978,"level":50,"err":{"message":"Forbidden","name":"Error","stack":"Error:
Forbidden\n at Object.exports.error
(/tmp/b/redis-2.6.9/sharelatex/web/node_modules/express/node_modules/connect/lib/utils.js:62:13)\n
at
/tmp/b/redis-2.6.9/sharelatex/web/node_modules/express/node_modules/connect/lib/middleware/csrf.js:55:41\n
at Object.handle
(/tmp/b/redis-2.6.9/sharelatex/web/app/js/infrastructure/Server.js:97:14)\n
at next
(/tmp/b/redis-2.6.9/sharelatex/web/node_modules/express/node_modules/connect/lib/proto.js:190:15)\n
at Object.handle
(/tmp/b/redis-2.6.9/sharelatex/web/app/js/infrastructure/Server.js:87:14)\n
at next
(/tmp/b/redis-2.6.9/sharelatex/web/node_modules/express/node_modules/connect/lib/proto.js:190:15)\n
at next
(/tmp/b/redis-2.6.9/sharelatex/web/node_modules/express/node_modules/connect/lib/middleware/session.js:312:9)\n
at /tmp/b/redis-2.6.9/sharelatex/web/node_modules/express/node_modules/co
nnect/lib/middleware/session.js:329:9\n at
/tmp/b/redis-2.6.9/sharelatex/web/node_modules/connect-redis/lib/connect-redis.js:93:25\n
at try_callback
(/tmp/b/redis-2.6.9/sharelatex/web/node_modules/connect-redis/node_modules/redis/index.js:522:9)\n
at RedisClient.return_reply
(/tmp/b/redis-2.6.9/sharelatex/web/node_modules/connect-redis/node_modules/redis/index.js:592:13)\n
at RedisReplyParser.
(/tmp/b/redis-2.6.9/sharelatex/web/node_modules/connect-redis/node_modules/redis/index.js:265:14)\n
at RedisReplyParser.EventEmitter.emit (events.js:95:17)\n at
RedisReplyParser.send_reply
(/tmp/b/redis-2.6.9/sharelatex/web/node_modules/connect-redis/node_modules/redis/lib/parser/javascript.js:281:18)\n
at RedisReplyParser.execute
(/tmp/b/redis-2.6.9/sharelatex/web/node_modules/connect-redis/node_modules/redis/lib/parser/javascript.js:188:26)\n
at RedisClient.on_data
(/tmp/b/redis-2.6.9/sharelatex/web/node_modules/connect-redis/node_modules/redis/index.js:478:27)\n
a t Socket.
(/tmp/b/redis-2.6.9/sharelatex/web/node_modules/connect-redis/node_modules/redis/index.js:79:14)\n
at Socket.EventEmitter.emit (events.js:95:17)\n at Socket. (stream_readable.js:746:14)\n
at Socket.EventEmitter.emit (events.js:92:17)\n at emitReadable
(_stream_readable.js:408:10)\n
at emitReadable (_stream_readable.js:404:5)\n at readableAddChunk (
_stream_readable.js:165:9)\n at Socket.Readable.push (_stream_readable.js:127:10)\n
at TCP.onread
(net.js:528:21)","status":403},"msg":"","time":"2014-02-26T11:36:58.757Z","v":0}
Error: MISCONF Redis is configured to save RDB snapshots, but is currently
not able to persist on disk. Commands that may modify the data set are
disabled. Please check Redis logs for details about the error.
at RedisReplyParser.
(/tmp/b/redis-2.6.9/sharelatex/web/node_modules/connect-redis/node_modules/redis/index.js:262:27)
at RedisReplyParser.EventEmitter.emit (events.js:95:17)
at RedisReplyParser.send_error
(/tmp/b/redis-2.6.9/sharelatex/web/node_modules/connect-redis/node_modules/redis/lib/parser/javascript.js:266:14)
at RedisReplyParser.execute
(/tmp/b/redis-2.6.9/sharelatex/web/node_modules/connect-redis/node_modules/redis/lib/parser/javascript.js:125:22)
at RedisClient.on_data
(/tmp/b/redis-2.6.9/sharelatex/web/node_modules/connect-redis/node_modules/redis/index.js:478:27)
at Socket.
(/tmp/b/redis-2.6.9/sharelatex/web/node_modules/connect-redis/node_modules/redis/index.js:79:14)
at Socket.EventEmitter.emit (events.js:95:17)
at Socket. (stream_readable.js:746:14)
at Socket.EventEmitter.emit (events.js:92:17)
at emitReadable
(_stream_readable.js:408:10)
at emitReadable (_stream_readable.js:404:5)
at readableAddChunk (_stream_readable.js:165:9)
at Socket.Readable.push (_stream_readable.js:127:10)
at TCP.onread (net.js:528:21)

Reply to this email directly or view it on GitHubhttps://github.com//issues/51#issuecomment-36116454
.

@laszewsk
Copy link

:) so what should be done ? I know its in the redis, but honestly, I do not think developers are actually interested in figuring out all the details for configuring this. As another person in the thread says he spend considerable time on configuring it and was not yet finished. But I think this is not where the community is best suited to contribute. It would be nice if a working shell script or vagrant file could be provided that automatically installs this software rather than spending a considerable time to read up here and there on what needs to be done (which is just a prerequisit). Maybe if you focus on creating the manual with a working detailed instruction on how to install things on ubuntu version xyz, that would be real nice. I think this would go a long way.

Interestingly enough I installed etherpad with a vagrant file and I had no issues and the install was completed in a very short time. Maybe the lessons or example set by etherpad could be considered and a more simple deployment is offered so developers can focus on other things than just trying to set this software up ...

I think what I do is wait for a better and integrated documentation on how to set sharelatex up. Maybe the wiki page will be completed by you including the documentation on how to set up redis for the development environment ... If so I can than look into completing the vagrant script. send me a mail when your documentation is ready laszewski@gmail.com

@jpallen
Copy link
Contributor

jpallen commented Feb 26, 2014

The problem with redis does not sound related to ShareLaTeX. We're not really able to support people in getting redis set up properly since it's not part of our project and there is a lot of great documentation out there already.

That said, of course we want ShareLaTeX to be as easy to set up as possible. A Vagrantfile would be great, but it's a lot of work (as I'm sure you can see!) and there's probably not going to be an official ShareLaTeX Vagrantfile for a while. We have a lot on our plate at the moment, and we want to wait to see which problems are the most common, and how best to solve them. So at the moment, a community supported Vagrantfile like yours is probably the only way it's going to happen, sorry.

@laszewsk
Copy link

I understand your concern, and your pragmatic decision to focus on other aspects. However, I think you may need to reconsider this as real community benefit you will obtain if you can actually deploy the software easily … I will check back next month to see if someone else in the community was able to install it and can provide a complete instalation instruction (maybe I overlooked it and you can send me the pointer).

On Feb 26, 2014, at 7:17 AM, James Allen notifications@github.com wrote:

The problem with redis does not sound related to ShareLaTeX. We're not really able to support people in getting redis set up properly since it's not part of our project and there is a lot of great documentation out there already.

That said, of course we want ShareLaTeX to be as easy to set up as possible. A Vagrantfile would be great, but it's a lot of work (as I'm sure you can see!) and there's probably not going to be an official ShareLaTeX Vagrantfile for a while. We have a lot on our plate at the moment, and we want to wait to see which problems are the most common, and how best to solve them. So at the moment, a community supported Vagrantfile like yours is probably the only way it's going to happen, sorry.


Reply to this email directly or view it on GitHub.

@henryoswald
Copy link
Contributor

@laszewsk you really need to look into redis and the documentation here, it sounds like you have it misconfigured. Setting up a working redis is normally trivial so I am sure you can work it out.

The official documentation is always going to be far superior to another version we have to write and maintain.

@jpallen
Copy link
Contributor

jpallen commented Feb 26, 2014

I've been thinking about this on and off all day today. This thread is getting quite long, so to summarise, I think that there are two ways of installing that we should have:

  1. The completely general way, like we have at the moment in the README. This will support any system/provider/OS so long as the end user can get redis/mongo/latex etc installed on their system
  2. A packaged install, probably based on Vagrant and Ubuntu that lets you run ShareLaTeX very easily. This won't be suitable for deployment/custom set ups, but it would be great to get hacking on it quickly.

I don't think we have the man-power/time at ShareLaTeX to support number 2 ourselves at the moment, but I would love to see a community initiative around this. Once set up it should be easy to maintain, and we'd always be on hand to answer questions and help out. I think @laszewsk's Vagrant set up is a great start here (https://github.com/laszewsk/vagrant-sharelatex). I'll try to have a look at what's not working with redis if I get the chance, but perhaps @cirosantilli would be interested in having a look too?

A simple install script is probably fine for configuring Vagrant at the moment, but eventually this could be done with chef cookbooks (Vagrant supports chef-solo as a provisioning method), which could also be used to set up ShareLaTeX on other platforms.

@palkan
Copy link
Contributor

palkan commented Feb 28, 2014

Hi all, again...

Here we go - https://github.com/palkan/sharelatex-vagrant-ansible - Vagrant+Ansible configuration!

Works just fine on OSX (and definitely should work on Linux systems). Windows... sorry (due to ansible incompatibility).

@jpallen
Copy link
Contributor

jpallen commented Feb 28, 2014

@palkan: Awesome! Thanks. I'll add this into our README.

@jpallen
Copy link
Contributor

jpallen commented Mar 3, 2014

I'm going to close this issue now since I think a Vagrant config is a good solution to making the install simple. If anyone thinks there should be another method, please open another discussion about it.

@jpallen jpallen closed this as completed Mar 3, 2014
@henryoswald
Copy link
Contributor

should we link to it in our wiki or something?

@jpallen
Copy link
Contributor

jpallen commented Mar 3, 2014

It's in the README.

On Mon, Mar 3, 2014 at 12:52 PM, Henry Oswald notifications@github.comwrote:

should we link to it in our wiki or something?

Reply to this email directly or view it on GitHubhttps://github.com//issues/51#issuecomment-36507213
.

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

No branches or pull requests

5 participants