Skip to content
Snippets Groups Projects
Commit 5617e4b7 authored by W. Spencer Smith's avatar W. Spencer Smith
Browse files

Instructions for creating a VM, installing dev tools and forking Drasil

parent d75c2a3b
No related branches found
No related tags found
No related merge requests found
File added
\documentclass[12pt]{article}
\usepackage{hyperref}
\oddsidemargin 0mm
\evensidemargin 0mm
\textwidth 160mm
\textheight 200mm
%\renewcommand\baselinestretch{0.85}
\pagestyle {plain}
\pagenumbering {arabic}
\title{Virtual Machine for CAS 741 and Drasil}
\author{Spencer Smith}
\begin{document}
\maketitle
This document summarizes the steps for setting up a software development
environment for use in CAS 741. Instructions are also give for forking Drasil.
A virtual machine is used so that the set-up will not interfere with your native
machine. Besides the benefit of not creating problems on the native machine,
starting from a clean slate means that the steps presented do not have to worry
about headaches caused by existing software and libraries. The steps are given
rather than simply creating a full image for your use (such as with Docker),
since reproducing the installation provides a greater opportunity for learning.
The steps emphasize command line (terminal) interaction, rather than using a
GUI. The advantage of using the command line is that it can provide a deeper
understanding of what is actually happening on your machine.
Working at the command line requires understanding directories (folders), files,
commands, permissions, etc. If you need to improve your background in these
topics, you may find the following links useful:
\begin{itemize}
\item \url{https://ubuntu.com/tutorials/command-line-for-beginners#1-overview}
\item \url{https://maker.pro/linux/tutorial/basic-linux-commands-for-beginners}
\item \url{https://ryanstutorials.net/linuxtutorial/}
\item \url{http://swcarpentry.github.io/shell-novice/}
\end{itemize}
To create a virtual machine, install typical software development tools, and
fork Drasil, follow these steps:
\begin{enumerate}
\item Install a virtualization environment to create an environment that exists
as software emulation, but appears as bare metal hardware to other
applications.
\begin{itemize}
\item VirtualBox is recommended: \href{https://www.virtualbox.org/}
{https://www.virtualbox.org/}
\end{itemize}
\item Install the Linux guest operating system inside the VirtualBox virtual
environment using Machine/New, as described in the
\href{https://www.virtualbox.org/manual/UserManual.html#gui-createvm}
{manual}. The following options are recommended:
\begin{itemize}
\item Name: whatever you prefer (cas741?)
\item Machine Folder: where you prefer (default is probably fine)
\item Type: Linux
\item Version: Ubuntu (64-bit)
\item Memory size: 2 Gig (2048 MB)
\item Hard disk file type: VDI (VirtualBox Disk Image)
\item Storage on physical hard disk: dynamically allocated
\item Hard drive size: 30 GBytes
\end{itemize}
\item Download the iso image for your Linux distribution. Recommend Bodhi Linux
(\url{https://www.bodhilinux.com/download/}). The Standard release is fine.
\item Start the VM (The Green arrow in the top bar of VirtualBox)
\item Select the iso image for your Linux distribution, click start
\item Select ``Install Bodhi Linux''
\item Follow installation steps. You can generally go with the suggested
defaults. One potential addition is under ``Updates and other software'',
where you may want to select ``Install third-party software for graphics and
wi-fi hardware''.
\item Update the OS by typing the following in a terminal \texttt{sudo apt
update \&\& sudo apt dist-upgrade} (When prompted, select Y for updating the
files (instead of the default N))
\item To enable copying between your virtual machine and your native machine,
install Guest Additions:
(\href{https://linuxize.com/post/how-to-install-virtualbox-guest-additions-in-ubuntu/}
{How to Install VirtualBox Guest Additions})
\item Follow the instructions from the web-page above to enable copy and paste
through VirtualBox
\href{https://www.geeksforgeeks.org/how-to-enable-copy-and-paste-in-oracle-virtualbox/}
{How to Enable Copy and Paste in Oracle VirtulaBox}
\item At this point you may want to change the screen resolution on your virtual
linux box. You can do this with the
\href{https://www.youtube.com/watch?v=jGGdDDv_XJo} {xrandr}
\item Install git: \texttt{sudo apt install git}
\item Install \LaTeX: \texttt{sudo apt install texlive-latex-extra}
\item Install doxygen: \texttt{sudo apt-get install doxygen}
\item Install dot (for doxygen): \texttt{sudo apt-get install graphviz}
\item Install Java Runtime Environment (JRE): \texttt{sudo apt install
default-jre}
\item Install Java Development Kit (JDL): \texttt{sudo apt install default-jdk}
\item You will need a text editor for \LaTeX{} and for source code. A popular
option is Sublime text, which can be installed following these
\href{https://www.sublimetext.com/docs/3/linux_repositories.html}{instructions}.
\item Instructions for setting up Sublime for \LaTeX{} are
\href{https://latextools.readthedocs.io/en/latest/install/}{here}. Part of
the instructions request installation of Evince for a document viewer. You
can use the Bodhi AppCentre to install Evince.
\item Decide on a home for your repos. For instance, you could create a folder
name \texttt{Repos}. You can create a folder using \texttt{mkdir}.
\item In your Repos folder, clone the course repo: \newline \texttt{git clone
https://gitlab.cas.mcmaster.ca/smiths/cas741.git}
\item For those doing the Drasil version, fork the
\href{https://github.com/JacquesCarette/Drasil} {Drasil repo}, by clicking on
the fork option in the upper right hand corner.
\item In your Repos folder, clone your forked version of Drasil: \newline \texttt{ git clone
https://github.com/[your account here]/Drasil.git}
\item Install Stack following these
\href{https://docs.haskellstack.org/en/stable/install_and_upgrade/}{Installation
Instructions}. This will likely involve installing \texttt{curl} via
\texttt{sudo apt install curl}
\item Run Drasil by following the quick start instructions at
\href{https://github.com/JacquesCarette/Drasil}
{https://github.com/JacquesCarette/Drasil} (It will take a long time the first
time.)
\end{enumerate}
\end{document}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment