Practices & Principles

Making my website and doing a rough sketch of my final project

Final Project Idea First Draft

The rough idea for my final project is to make a [semi] self-sustaining hydroponic growing system in a small greenhouse. My end goal is to have a decent yield of fruits, vegetables, and herbs in a relatively small amount of space (a portion of a room in an apartment, for example) and have a robust monitoring system. Ideally it can adjust automatically to the common issues faced in these set-ups and self-adjust as much as possible. I've chosen hydroponic growing because from what I've read it is more space efficient than traditional soil grown plants. At this juncture I am not set on the type of hydroponic system I'd like to use. With the use of a greenhouse structure I hope to have more flexibility on what can be grown inside the system.

Although I don't believe it is anything necessarily novel, my inspiration for choosing this project stems from a a strong interest in learning more about horticulture and growing plants in general as I have no experience in the area. This seems like a great way to jump in. You can follow along with my progress on the final project page

Making My Website

  1. Find a good template
  2. The first step of the website building process was finding a good website template that was well-formed to the needs of Fab Academy. Building from scratch was an option but given my lack of design skills and the number of good templates there are that meet the requirements, I quickly eschewed that idea. Using Alejandra's website as my ideal prototype I began my search.

    After winnowing down my options I decided on this template. I felt it was clean and would minimize the amount of work I'd need to put in to change it.

  3. Change images and descriptions
  4. The second step of the process was to change the template to my needs. Not much needed to be done apart from adding new blocks for each week and doing a google search for images that fit the subject of that week. I also had to write a brief About Me description (the most painstaking part of the process).

  5. Setting up authentication with my FabAcademy Gitlab repository
  6. The first thing I needed to do to push my changes was be properly authenticated with my designated FabAcademy repository. This will be two parts: The way I did it and the way it should've been done!

    • Method 1: Use username and password as authentication (The path less traveled)
      1. Use Forgot Password to set my password
      2. We know our emails are attached to our repositories but we aren't given passwords. I used the Forgot Password feature to create a password to use when pushing my new code from the command line

      3. Clone the repository with HTTPS
      4. There are two option in cloning a repository: You can clone with SSH or with HTTPS. Given I intended to use username/password authentication to push code from the command line, I cloned with HTTPS. Extra info: In an already existing git repository you can see the type of authentication being used by looking in the .git/config file of the root directory. There it can be seen if the URL for the remote repository begins with HTTPS or SSH. As of this writing you can find the two URL options to clone in the top right corner of your Gitlab repo homepage:

      5. Clone the repo
      6. To clone your repository to your local machine use the following commands in your terminal (I use a Mac but this will work on any linux machine):

                                
          $ cd directory/of/your/choice #This puts you in the directory you'd like your project to be stored
          
          $ git clone repository_url #clones the repository
          
                              
                            

      7. Now when I run my git commands to push to my Fab Academy repository I will be asked for my username/password
    • Method 2: Use SSH private/public key authentication (The recommended way)
  7. Push to repository
  8. After I cloned the repository and added and edited the files to my liking, I was then ready to push to Gitlab and see my changes on my homepage on the internet.

    1. Tell git which changes to track
    2. To keep things simple, I used this command from my root directory to add all of the files to my git repository

                          
      $ git add .
                          
                        

    3. Commit/save the changes made
    4. After I "registered" the changes with git above I was then able to officially add them to my repository with:

                          
      $ git commit -m "Message describing what I've changed here"
                          
                        
      The final part of this command is where one describes changes made since the last commit. It's important to be descriptive here (but don't write a novel) because it can be very useful in tracking where features or bugs were introduced later on.

    5. Push to Gitlab and view page
    6. Finally I pushed my changes to the server

                          
      $ git push origin master
                          
                        

  9. Woops, I forgot add the .gitlab_ci.yml file
  10. This being my first time using Gitlab I wasn't sure on how the changes you make in your repository get displayed on your webpage. It turns out you need to add a special file in the root of your directory, .gitlab_ci.yml, to tell Gitlab to make your webpage from what you've pushed. Depending on the tools you've used (Python, php, html, markdown, etc...) this file will be different. My site requires no backend code, just html, css, js so this part was simple. I copied this yml template here, added it to my repository with the commands in this step. Note: This yml template requires that you have index.html file in the root of your repository