Showing posts with label heroku. Show all posts
Showing posts with label heroku. Show all posts
Wednesday, May 31, 2017
Wednesday, March 29, 2017
Rails Study, Day 4: Still Working on the Dev Environment
So far I have spent time on the following:
- Vagrant
- Docker
- Digital Ocean Droplet
- Heroku
However, I'm going to take a step back and reconsider what I'm trying to accomplish.
What is my deliverable?
I want to build a Rails site, hosted on Heroku, that showcases my solutions to puzzles from Advent of Code.
How is my work supposed to flow?
![]() |
| Images, containers, Atom, etc. |
- Development environment (DE) is separate from the host operating system. (Docker container or VM)
- Text editor (Atom) has read/write access to the code in the DE.
- The DE can be easily duplicated for a sandbox server.
- Code from the DE can be pushed to Github; from Github, the latest code cloned.
- Changes from the DE can be pushed to Docker Hub; from DH the latest version of the DE.
- Production code from the DE can be pushed to Heroku; from Heroku, the latest production code, although that should be available in Github.
What are the specifications of my development environment?
- Version control of all relevant packages.
- Read/Write access to development environment from host.
- Access to online platform (Github,
- Available locally, without a constant internet connection.
- Totally accessible by Atom text editor on my host machine.
- Can upload code to Heroku, pull the latest code from Heroku, and push updated code to Heroku.
- Can push updates to the environment to a repository.
What shall be my development environment?
- Docker container for the DE, with all the necessary packages installed.
- Atom text editor installed on host.
- FTP access between DE and host.
- Github access from DE.
- Docker Hub access from DE.
- Heroku access from DE.
Rails Study, Day 4: Docker and Vagrant
I came for Rails, I'm working on DevOps.
The purpose of this post is to give an account of setting up my development environment in order to study Ruby on Rails.
I am already familiar with Vagrant, and initially thought I would spin an Ubuntu 16.04 box and work in that. However, the obvious and numerous disadvantages of working in a virtual machine on a local hard drive demanded that I find something better.
So I decided to finally invest some time on Docker, and I have to say, once I wrapped my head around the concept of containers, getting started seems fairly straightforward.
Initial Steps:
- Install Vagrant on my host
- Install Docker on my host
- Spin up an Ubuntu box in Vagrant
- Install Docker on my VM
- Create an account on Docker Hub
- Download the Heroku Cedar 16 image
- Create a private docker repository on my host
- Run the Heroku Docker image
- Push a modified Docker image to my own repository
- Pull the modified Docker image to my VM
And so forth.
As I want my development environment to mirror Heroku's settings as closely as possible, I decided to see what the Heroku website itself has to say on the matter.
My inclination was to keep it simple by using Vagrant, but Heroku's Cedar stack is available as a Docker image, so I will go with Docker instead. I've been meaning to familiarise myself with Docker for a while, so this works for me.
Official Notes for Docker are available from Gist.
This videos helps to demystify Docker.
I'm now looking into simplifying it further and using a Droplet from Digital Ocean.
Monday, March 27, 2017
Rails Study, Day 2: Rails Install Fest
I have started a demonstration blog on Rails according to the instructions on the Ruby on Rails Install Fest, my first proper attempt at building something substantial on Rails. My goal is to build a website that showcases my solutions to Advent of Code, but the first step is to have a site running on Rails, and in my case, hosted on Heroku.
Wish me luck!
Update:
Update:
Had to solve problems with installing the following gems:
Wish me luck!
Update:
Update:
Had to solve problems with installing the following gems:
- json
- pg
The json gem was set to 1.8.3, but I solved it by forcing the version to 1.8.5.
The pg gem was able to install after I properly re-installed Postgres on my machine.
Update:
Now running into problems with Postgresql.
Update:
Now running into problems with Postgresql.
Thursday, March 23, 2017
Ruby Achievement Unlocked, Time for Rails
Having reviewed my solutions to the first three Days of puzzles of Advent of Code, I am now comfortably proficient in the fundamentals of programming in pure Ruby.
When presented with a problem, I am confident that I can do the following:
Thereafter, I am now confident that, given enough time, I can solve the problem. There is room for vast improvement, but that will come with time.
I really enjoy the daily solution of programming puzzles, and would love to solve all fifty; however, my duty is to prioritise my studies according to optimal employment criteria, and there aren't a lot of jobs going for junior developers who specialise in solving fun puzzles in pure Ruby.
Having passed this milestone in my learning, I am now ready to hit the books again. My study plan encompasses the following:
To gain experience in upgrading older Rails versions, I could probably clone the source code of an existing Rails to a virtual machine, on which an old version of Rails is installed. However, this is a lower priority.
As all who know me can attest to, I can learn and work quickly and efficiently, and am adaptable and resilient. I also take pride in managing expectations between multiple clients and communicating with both clients and colleagues.
For the next couple of weeks I will focus primarily on the Rails framework by working through Ryan Bigg's promisingly large tome: Rails 4 in Action. In this way I expect to establish a thorough grounding in Rails and also a gain a perspective on the changes from Rails 4 to Rails 5, which could come in handy if I ever work on a legacy codebase.
When presented with a problem, I am confident that I can do the following:
- Define the problem
- Describe the solution broadly in programming terms
- Denote the likely classes and methods to be used therein
Thereafter, I am now confident that, given enough time, I can solve the problem. There is room for vast improvement, but that will come with time.
I really enjoy the daily solution of programming puzzles, and would love to solve all fifty; however, my duty is to prioritise my studies according to optimal employment criteria, and there aren't a lot of jobs going for junior developers who specialise in solving fun puzzles in pure Ruby.
Having passed this milestone in my learning, I am now ready to hit the books again. My study plan encompasses the following:
- Build a website in Ruby on Rails to showcase my Advent of Code puzzle solutions. This includes the following:
- Deep knowledge of Rails
- Proficiency in Javascript
- Proficiency in JQuery
- Proficiency in HTML/CSS
- Proficiency in PostgreSQL and/or mySQL
- Writing automated tests in RSpec (my preference) or Factory Girl
- Host the website on Heroku
- Additionally, I will further my knowledge of the following:
- Coffeescript
- Haml
- Amazon Web Services: it would be good to know which services are of the highest priority, as one could spend a lifetime on there.
To gain experience in upgrading older Rails versions, I could probably clone the source code of an existing Rails to a virtual machine, on which an old version of Rails is installed. However, this is a lower priority.
As all who know me can attest to, I can learn and work quickly and efficiently, and am adaptable and resilient. I also take pride in managing expectations between multiple clients and communicating with both clients and colleagues.
For the next couple of weeks I will focus primarily on the Rails framework by working through Ryan Bigg's promisingly large tome: Rails 4 in Action. In this way I expect to establish a thorough grounding in Rails and also a gain a perspective on the changes from Rails 4 to Rails 5, which could come in handy if I ever work on a legacy codebase.
Subscribe to:
Posts (Atom)
1,050 hours
It took me 13 working days to complete my first 100 "work" pomodoros as a Junior Software Tester at Profectus Group. Much of ...
-
I have finished re-writing my text adventure game, Tree House Prince, available here: ( https://github.com/clockworkpc/tree-house-prince...
-
NOTE: My fiancée wishes to stay out of the online limelight, and neither her real name nor her image shall appear in this or future posts. ...
-
It's 03:08 and I am finally starting to make sense of object-oriented programming. It's not that I didn't understand it concep...




