[dba-Tech] Cloud prices are (have) coming down

Jim Lawrence accessd at shaw.ca
Wed Apr 2 20:31:02 CDT 2014


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


Wed, 2 Apr 2014 16:19:42 -0600 (MDT) from Jim Lawrence <accessd at shaw.ca>:
>Hi Shamil:
>
>If you do decide to go the DigialOcean route, use the promo code "unpluggedapril" and you will get a $10.00 credit which, if you had chosen the $5.00 entry level option, would give you another two months for free. :-)
>
>Additional note; DigitalOcean uses a TB broadband connection which will allow many users to simultaneously access your Cloud content.
>
>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 1:49:44 AM
>Subject: Re: [dba-Tech] Cloud prices are (have) coming down
>
> Hi Jim --
>
>Thank you, these DigitalOcean's one-click, 55 seconds setup, hosting/development stacks look so tempting to try them out :-)
>
>https://www.digitalocean.com/one-click-apps/
>
>IMO Microsoft will have to lower their hosting plans even more to effectively compete with such hosting proposals as DigitalOcean. 
>Also (that could be only my impression?) when reading through MS Azure hosting plans and usage docs - it all looks so "heavy" to start with unlike DigitalOcean...
>
>-- Shamil
<<< skipped >>>
>
_______________________________________________
dba-Tech mailing list
dba-Tech at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-tech
Website: http://www.databaseadvisors.com



More information about the dba-Tech mailing list