Can we use a OS user other than "rundeck" to install rundeck? - rundeck

We have a use case where we cant use "rundeck" os user and need an alternative user to install rundeck.

You have (at least) three options:
If you need to execute your commands and/or script as another user you can use this plugin, just save the latest release .jar file in the libext directory and the plugin should be ready to use.
If you really need to run rundeck as another user, the easiest way is to make a WAR-based installation. In this way, the user that launches rundeck is the "rundeck" user.
Run Rundeck on Docker, you can create a server-independent container based on the official Docker image, here a lot of examples.

Related

How do I create a Install4J Installer able to run multiple instances at the same time?

I have created an installer which is able to install several applications (the user can choose what to install).
I would like to know if its possible to run multiple instances of the installer in the same machine at the same time, I couldn't find an option to enable this feature.
On the "General Settings->Compiler Variables" step you can define the compiler variable
sys.ext.installerSingleInstance=false
Then the installer will not be in single instance mode.

How to run a user desktop application from a debian package post-install script?

I've created a debian package (for ubuntu 16.04). The package installs a .desktop file in /etc/xdg/autostart, so that the application will start when a user logs on, and for all users.
But I'd also need to start that application immediately in the current session, i.e. the session of the user that initiated the installation of the package. I need to avoid that the user must log off and on again.
Can this be done from inside a postinst script?

Vagrant Berkshelf - Shelf Path?

Is it possible to set the path where the berkshelf plugin puts the cookbooks it installs? (As in the .berkshelf folder)
I am running Windows 7.
I am currently trying to install a mysql server using an opscode cookbook to a vm and here at work they have the %HOMEDRIVE% system variable set to a network drive. So when .berkshelf starts at the beginning of the Vagrantfile, it pushes the cookbooks to the network drive and it causes it to be slow and well, its not where it should be. Is there a fix to this?
VirtualBox did this as well, but I fixed it by altering the settings. I tried looking for some sort of equivalent settings for berkshelf, but the closest I got was for the standard berkshelf (thats not a vagrant plugin), it appears you can set this environment variable:
ENV['BERKSHELF_PATH']
Found here:
http://www.rubydoc.info/github/RiotGames/berkshelf/Berkshelf#berkshelf_path-class_method
I need to be able to have the cookbooks it reads from the berksfile store to my laptops local drive instead, as in my scenario I cannot have the mobility of the VM limited to the building because of files that are stored on the network.
Any incite would be much appreciated.
Perhaps its better to use the actual berkshelf over the vagrant plugin?
Thanks.
If you want to have the portability - a full chef-repo ready for chef-solo runs, better off using standalone berkshelf instead of the vagrant-berkshelf plugin - which is NOT that flexibly.
For complex cookbooks, I prefer to use standalone berkshelf as it allows me to do berks install --path chef/cookbooks to copy all cookbooks required from ~/.berkshelf/cookbooks, then I can just tar the whole thing and transfer to other machines for the same chef-solo run. some people use capistrano automate the tar and scp/rsync over the network. I just use rysnc/scp;-)
HTH

Deploying meteor app to a webserver

Does anyone know a step by step guide to deploy the own meteor app from windows to a webspace (not xxx.meteor.com).
I've found some tools like meteor.sh, but I'm a beginner and it's difficult without a guidance and without linux (needed to execute sh-files for example)
Make your project locally
Build your project locally, you could test it using meteor run or even meteor deploy xxx.meteor.com to see if its working
Bundle your app
Use meteor bundle deploy.tar.gz to make a file called deploy.tar.gz in your meteor directory containing your project
Upload your file to your server
This depends more on how your server is/what your platform is but you can use a tool to upload it for you (e.g Transmit on mac)
Install node.js & fibers on your platform if you don't have it already
This depends alot on your server platform. Have a look at http://nodejs.org/ for more detailed instructions
Extract your bundle
If on a *nix platform you could do the below in the directory where you uploaded your bundle (explanation):
tar -xzvf bundle.tar.gz
Enter the directory and install fibers
Fibers is needed for any meteor project, it helps use synchronous style code on server side javascript:
cd bundle/programs/server/node_modules
rm -r fibers
npm install fibers#1.0.1
The first line enters the directory in your bundle where fibers is installed, the second removes it, and the third reinstalls it.
Get MongoDB on another server or use a third party service like mongohq
Meteor production deployments need another mongodb. You can either install it on another server or use a third party server. It's not recommended to install it on the same server you install meteor on.
Finally check if your project is runnable
cd ../../../
node MONGO_URL=mongodb://dbuser:dbpassword#dbhost:dbport/meteor ROOT_URL=http://yourwebsite.com app.js
The first line gets you back to the bundle directory and the second runs node.js on your project with the parameters that let you connect to your mongodb database.
Install something to let it run in the background
It depends on which one you want to use, foreverjs is quite easy to use
npm install forever -g
If you get an error problem try using sudo before the npm (which lets you run as a super user).
Then you can run forever:
forever start MONGO_URL=mongodb://dbuser:dbpassword#dbhost:dbport/meteor ROOT_URL=http://yourwebsite.com app.js
And its done!
Extra notes
While its not that easy to get started from scratch this should help you get started. You still need to secure your mongodb server up if you've used your own servers.
The meteor.sh script does pretty much the same as above but very quickly if you learn to use that instead it might be faster to deploy updates
You might not have wget or a couple of commands that you might need that come up and give you Unknown command errors. Have a go at running yum or apt-get and see which one of the two you might have. You can then install the required package using one of these installer tools, i.e with yum install wget
I hope this helps you, its not that easy to deploy to a server on the first shot as a couple of things might be missing (files/packages/dependencies), you might run into other problems with permissions & stuff, but you could always ask on serverfault or here on stackoverflow on what you run into.
I recommend Meteoric.
Note, that you need to run meteoric from your development machine.
Script is self explanatory and works perfect for me.

Correct deployment tool to copy files & run SQL Script

What would be the best way to deploy upgrades to a piece of software with the following requirements:
The upgrade:
Must be run from a client machine, not a server.
Must Show a dialog to select a network location and copy files to a share.
Must show a dialog to enter SQL Server connection information and the upgrade must connect to SQL Server to run an upgrade script.
Must not change anything on the client machine from which the upgrade is run. (Nothing in Add/Remove programs, registry, etc. I.e. no Windows Installer.)
Must not rely on any additional dlls or frameworks. The user must be able to download a single file and run it from Windows XP SP2 without having to install anything else.
Some things I have looked into:
Batch files (can’t show a dialog to allow the user to enter connection information)
OSQL (can’t show a dialog and can’t copy files)
WiX (runs on top of Windows Installer so it puts things on the client machine from which it is run)
Custom C#/VB app (requires .NET framework)
Winzip/WinRAR (can't show a dialog, can’t run SQL Scripts)
If you don't want to rely on any dlls and frameworks, you should make a native app, this can be, for example, custom winrar sfx (you can run additional scripts after extraction, this can be a batch that executes sqlcmd).