Kanye West, a man who is so confident that he often likes to compare himself to Jesus, is here today to enlighten you (and your ego) with some words of wisdom. Introducing the ElasticBox Kanye-fidence App, which was recently featured on USA today. This App will boost your self esteem by using direct quotes from interviews that are then paired with Kanye pictures! What more could you possibly ask for?
We knew that once you had seen this App, you would want to build a box for it that you could deploy onto any provider right? That’s why we already went ahead and built one for your convenience so that we could dazzle you with this step by step tutorial so that you too can make a Kanye-fidence app!
Building The Box:
To create the Kanye-fidence Generator app, you’ll be able to use a few of the already available ElasticBox public boxes. This app will consist of two Boxes, Github to pull in the source code from this repository and an Nginx webserver.
1) To get started, create a new box and call it Kanye-fidence, or whatever you like, anything that strikes Kanye-fidence in your box building skills. Make sure you choose Linux as the service for this Box.
Next, add one box variable, Github. You can add Box variables by clicking the ‘New’ button in the Box Variables section, then selecting Github as the value.
Once you’ve added the Github box, expand that Box and the nested git_repo Box so that the CLONE_URL variable is visible. Edit this variable to include the Github repo for the Kanye-fidence application. Make sure to use the https: address of the Github repo.
2) Next, we’ll be creating a basic Nginx Box. Head back to the Boxes page and click “New Box” to create a new Nginx Box.
The first thing I do is add a package installer box that we use to install various packages on different Operating Systems. In this case, I add Nginx as a service for the ubuntu installer.
The I add an http port by adding it as a variable. I use 80 as the default port and name the variable http
Then I add another Box variable which is a file I name proxy.
I then add a proxy.conf file with the following code in this gist.
Finally, in the events section below, in the configure script, I add the following code:
#!/bin/bash curl $proxy | elasticbox config -o /etc/nginx/sites-available/proxy if [ -f /etc/nginx/sites-enabled/proxy ]; then rm /etc/nginx/sites-enabled/proxy fi if [ -f /etc/nginx/sites-enabled/proxy ]; then rm /etc/nginx/sites-enabled/proxy fi ln -s /etc/nginx/sites-available/proxy /etc/nginx/sites-enabled/proxy
And in the post_start script I restart Nginx.
#!/bin/bash service nginx restart
3) After adding the event scripts, I head back to the Kanye-fidence Box and add the Nginx box that I just created as the final box variable.
Once that’s done, I’m ready to deploy the Kanye-fidence Box. The final step is to create a deployment profile. This is where I configure my infrastructure for the Kanye-fidence Box.
First I name my environment and then click the link to create a new Deployment Profile.
In the case of the Kanye-fidence Box, I use AWS as the provider, choose US West 1 and Ubunutu as the Operating System.
Once that’s done, you should have your Kanye-fidence App up and running in no time. Give Kanye-fidence box a try and if you think you can make some enhancements to the Kanye-fidence App, feel free to fork it and submit a pull request.