How to gather all offline resources from cookbook before chef-solo offline install - offline-caching

I have a server that will not have access to the internet to download items - is there any way to force chef to grab everything it needs and then bundle it for 'offline' use? I can move files to and from the server to a bastion, that I can access from my workstation.

I asked in a chat room and the answer was the 'vendor' option of berkshelf.

Related

Install Apache with a mvc application?

Is it possible to add an Apache web server to an MVC project so that at the end you get an installation that installs the web server and moves the web page to the right folder?Or exactly the other way around, is there an Apache installation that you give your website to so it goes straight to the right folder?Does something like this exist in an easy way? Or maybe not with Apache but with a other application?
if I understand your question you want to automate the installation of "PHP/Apache" websites using "ASP.net MVC app"
I've done this before, I used Plesk CLI to create user accounts, databases, copy files ... etc.
You may want to use Cpanel UAPI for doing this tasks on remote Linux server.

Build to a Windows Server

I'm using Jenkins to build my WAR/EAR to a windows server.Everything works fine.i.e I can push my files on the server using my username,But what I want is to Create a group so that everyone in that group can push the code into the server not only me, In case I leave the organisation then the above needs to be changed instead if a group is allowed then, this wont be an issue anymore.
So my question is I have a group created on the windows server with the people needed to have access,But how do I login into the server using that group or better yet how do I mention that in Jenkins so that Jenkins has access to that group.
I have heard that groups perform the same function of a application user of that of Unix (Not sure.)
Jenkins using it's own user jenkins so if your issue is only to have Jenkins able to login to server, I would suggest to add user Jenkins to the group you mentioned.

Can't access my reddit installation

I install Reddit Script on my server but I can't access my installation. I try to access http://129.xxx.xx.xx (my server IP address but is has a redirection to reddit.local and here looks to load for ever.
I install it using my automatic installer and after that I just populate the script with some data as per instruction provided in the bottom of the instruction document.
I miss something?
You'll need to configure the hostname you used (it sounds like reddit.local) to point to the correct place. The easiest method to do this is via an entry in your /etc/hosts.
Does it work if you request from localhost on the server?
The install script is designed for testing (i.e. in a Vagrant VM), not production; if you're trying to set up a production website, you'll probably want to follow the manual install guide.

Migrating Umbraco 4.7

I want to migrate an exsisting Umbraco install from our developer's website into my private virtual server.
I suppose that the server configuration will be different i.e SQL server maybe different version .. ISS .. an so on ..
I wanted to understand what would you recommend as a method to migrate the install ..
I know my way around manually installing web applications (DB, IIS included).. would that be the case if so where can i find a manual on what settings are required to manually install exsisting Umbarco Website on a new server.
And most importantlly what do i need to request from my developer (i.e. files, IIS XML Config backup, SQL DB backup etc..)
There is nothing special about migrating an Umbraco setup to a new server. You'll need a copy of the entire web directory, and a backup copy of the database.
Restore the database to your SQL server, copy the web directory into a directory on your web server, change the connection strings in the web.config to use your SQL server and assuming you have met the prerequisites for running umbraco, you should be good to go.
Alternatively, If you are not sure that your server has everything it needs, you could use the 'Web Platform Installer' to install an empty 4.7.1.1 install, and then copy your developers files over the files installed by the WPI. Going the this route will make the WPI install the prerequisites if you don't have them.
Then you just modify the web.config where necessary to point it to your database server.
EDIT: If your developer has created any custom controls, you'll want to make sure you get copies of the source code for those as well, but you don't need the source to run the site.
You have a couple of options:
If you don't have Remote Desktop access to the developer's server, ask him to give you a Web Deploy package (if he doesn't have Web Deploy already installed, point him here), and install Web Deploy on your own machine. Then you can just right-click on "Web Sites" in IIS and choose "Import Package".
You could purchase Courier, a pro Umbraco add-on which allows you to do full migrations of Umbraco sites between disconnected servers. You set up a blank Umbraco installation from Codeplex, or use Web Platform Installer to get it (get v4.7, not v5, as they're incompatible with one another - v5 uses MVC), install Courier on both the developer site and your live site, and migrate document types, documents, templates, stylesheets, media, and all other necessary resources over to your new environment.

RoR app deployed on Heroku and working with SQL Server database

Is it feasible to have a Ruby on Rails app, which is:
a) deployed on Heroku, and
b) working with a remote SQL Server database?
I take it that I'll need unixODBC installed on Heroku, but I cannot find a way to do so. Is this possible?
Or, is there any other way (without ODBC?) to accomplish this?
Thank you very much for any guidance or tip.
Updated:
Some info on the subject:
1) Heroku pre-installs both unixODBC and FreeTDS by default, so you already have them.
2) Also, it is possible to run shell commands via Heroku Console in backticks, e.g.:
heroku console
`odbcinst`
(runs "odbcinst" command in Heroku shell and shows the result)
3) You do not have access to filesystem outside of your slice where the packages are installed. If you only need a driver path, Heroku support can provide it (/usr/lib/odbc/libtdsodbc.so in my case).
4) You cannot run sudo commands in Heroku shell.
At the moment, to connect to MS SQL Server you at least need to append ‘freetds.conf’ file. Even when using tinyTDS (there is an open ticket#2 in tinyTDS gitgub issue page). DSN-less connection instructions from "wiki.rubyonrails.org SLASH database-support SLASH ms-sql" didn’t work for me, I guess this connection requires some extra-configuration either.
‘freetds.conf’ cannot be modified without sudo. Therefore, I conclude that currently there is no way to make MS SQL and Heroku work together.
I’ve managed to set up this connection with EngineYard and activerecord-sqlserver-adapter.
I followed these instructions:
https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/wiki/Platform-Installation---Ubuntu
(there are only some filepath differences, e.g. ‘odbc.ini’ is located in ‘/etc/unicodbc’, not in ‘/etc’ - this is easy to work out).
I installed 'unixODBC' and 'freetds' packages using EY Unix Packages feature, and made all configurations manually through SSH. Sudo is available in EY (no password required). There is also Chef Recepes feature to automate those configurations (seems to be pretty easy, I'm going to try it tomorrow).
Hope this is helpful.
It is possible.
Because Heroku copies/symlinks its own config/database.yml over whatever you supply in your repository, you may need to take additional steps (e.g. in config/environments/production.rb or in config/initializers/remote_mssql_from_heroku.rb) to set up your application appropriately.
You will face the challenge, however, that traffic from Heroku to your MSSQL database will traverse the public internet. By default, this traffic will not be encrypted. Potentially everyone in the world will be able to monitor your traffic between your Heroku application and your database, and even alter the traffic in-flight, whether for benign or malicious purpose, without you being able to detect it. MS SQL offers the capability to connect over SSL. This capability requires explicit configuration in the MSSQL server, so you must be able to access and modify that configuration. Additionally, this configuration requires that your client library be up-to-date and capable of talking with MSSQL over SSL. Note that MSSQL server will enforce that your server certificate list a Common Name or Subject Alternative Name exactly matching or wildcard-matching the server's FQDN (at least, the FQDN that the server knows about), and that the client use an FQDN for the server exactly matching or wildcard-matching one of the names on the certificate.
I've successfully used the following article which uses Heroku's newer buildpack feature to use TinyTDS and connect remotely to SQL Server 2008 R2. I'm still investigating how I could encrypt traffic. Hope this helps others!
http://blog.firmhouse.com/connecting-to-sql-server-from-heroku-with-freetds-here-is-how-on-cedar#
We're having a similar problem where we're needing to import old data from a SQL Server database into our new app. The data isn't a straight table import, but needs to undergo some processing and conversions. We've built an import layer for this which lives in a private gem, so as to not pollute the new app with the old data conversion issues. This approach is also designed to permit incremental updates, as we get closer to launch we'll keep syncing records up to the moment of switch-over.
Heroku told us that it's not trivial to connect to SQLServer, in particular as they don't support FreeTDS. Their support staff recommended to run an instance with the import gem from a laptop in our office and configure it to connect to their database (which requires a dedicated DB, not the free shared one). This sounded like the most palatable approach to us.
Secondly, regarding security that was mentioned by #Justice, we discussed configuring SSL for SQLServer with the hosting company and they pointed out the complexities of this. They recommended VPN as an easier solution. As we don't have office-side VPN hardware, the simplest and free solution proved to be an SSH tunnel.
We've set up an SSH tunnel from the laptop to the SQLServer Windows box. That was straightforward. We had CopSSH installed on Windows (which comes with a Linux shell, by the way) and we were able to simply set up a tunnel, having the laptop talk to localhost for its SQLServer connection, i.e.:
ssh -L 1433:localhost:1433 user#windows_server_name
I did not know Heroku has FreeTDS on it? I was told they did not. TinyTDS if used with FreeTDS 0.91 can have a zero freetds.conf dependency and be driving by runtime connection args. We are looking into building an Ubuntu 10.4 native gem that statically links 0.91 with OpenSSL so you can just drop it into Heroku and us it to connect to Azure and/or you own outside DB.

Resources