Salakhetdinov Shamil
mcp2004 at mail.ru
Thu Apr 3 02:16:54 CDT 2014
Hi Jim -- I used Ubuntu 12.04.3 x64 with MEAN application stack. It all took 55 seconds to setup as declared on DigitalOcean start web page: https://www.digitalocean.com/ The web site at http://188.226.192.87:3000/ is just a default Node.js (Express framework + MongoDB(?)) one I have started after initial setup using: cd /opt/mean grunt Thank you for your notes on how to organize start-up tasks activation. I will have to learn quite a lot. First of all I will have to make script to create my own users after a droplet setup. Second, I will have to find what is the best way to start an FTP service on droplet start-up. ... -- Shamil Wed, 2 Apr 2014 19:31:02 -0600 (MDT) from Jim Lawrence <accessd at shaw.ca>: >Hi Shamil: > >Impressive...wow...that was quick. What droplet did you use? > >I am not absolutely sure but Hans will definitely know...I will forward him the post. > >To my way of thinking that once the website is up and running it should just keep running. I am sure there is a Apache configuration that will start your app. > >OTOH, the system will execute all scripts from which it finds a configuration in directory /etc/init. The following *.conf configuration script file is used to start up samba on restart or bootup. A similar version should work fine for your application. First create a text file: sudo gedit shamil.conf: > ><example> ># Her is an existing example cut and pasted with my comments added. ># The original script can be found in the /etc/init directory and is named samba-ad-dc.conf > >description "SMB/CIFS File and Active Directory Server" >author "Jelmer Vernooij < jelmer at ubuntu.com >" > ># start on bootup or restart >start on (local-filesystems and net-device-up) > ># stop application in the event of a on serious system runlevel error >stop on runlevel [!2345] > ># no major errors so continue. check to see if the system is completely ># up and running...if not wait for return code >expect fork ># if an error exit politely without a respawn or error message >normal exit 0 > ># Samba is not yet running so let's to see if all files are in place ># and properly configured for execution and use under root >pre-start script >[ -r /etc/default/samba4 ] && . /etc/default/samba4 >install -o root -g root -m 755 -d /var/run/samba >install -o root -g root -m 755 -d /var/log/samba >end script > ># In this case execute the SAMBA application. ># the exec can also call a BASH script even with parameters >exec samba -D ></example> > >...and when the script is finished it would be written to /etc/init directory. So when ever Ubuntu Linux is running your application should also be. Check daemon job configuration scripts...seems similar to Windows power tools and scripts. > >HTH > >PS Your site looks really nice. > >Jim > >----- Original Message ----- >From: "Salakhetdinov Shamil" < mcp2004 at mail.ru > >To: "Discussion of Hardware and Software issues" < dba-tech at databaseadvisors.com > >Sent: Wednesday, 2 April, 2014 3:56:12 PM >Subject: Re: [dba-Tech] Cloud prices are (have) coming down > > Hi Jim -- > >Thank you, but I have already got DigitalOcean droplet hosted using $5/month plan. (Pity your promo code can't be used now :( ) > >> DigitalOcean uses a TB broadband connection which will allow many users to simultaneously access your Cloud content. >I have got Mean stack activated - here is my default demo app: > >http://188.226.192.87:3000/ > >I have connected to my VPS using PuTTY and then I have typed two shell commands: > >cd /opt/mean >grunt > >to start node.js with sample express (framework) web site from /opt/mean folder (and mongodb backend). >Not sure if it will continue running if I will get my dev PC offline. > >Do you know what Linux start-up command should I use to have this sample web site started on VPS reboot and running in unattended mode? >As far as I have found I can edit crontab file from /etc folder but adding to it > >@reboot cd /opt/mean >@reboot grunt > >and rebooting didn't work for me. Do you know what edits should I do in crontab to get my sample web site started in unattended mode on reboot? > >Thank you. > >-- Shamil > ><<< skipped >>>