Daily use setup

Aims:

  • Setup up workflow for daily project operation

Steps:

1. Start AWS instance

(Connect to AWS)

2. Update AWS

(Get project on to AWS)

1. Start AWS instance

Description:

  • Connect to AWS and set up notebook

Steps:

  1. Open terminal, get a 3 pane tmux session
    • Split vertical
      tmux
      ctrl-b 
      %
    • Split horizontal
      ctrl-b
      "
    • Navigate if need
      ctrl-b
      *arrows to navigate*
  2. In the bottom right pane go to folder with course files in it, then into the setup folder /course/setup
  3. Start the alias, which simplifies the AWS commands for us
    source aws-alias.sh
  4. See the list of alias commands and what they are doing behind the scenes. E.g.
    alias
    aws-get-t2
    aws-get-p2
    aws-start
    aws-ip
    aws-nb
    aws-ssh
    aws-stop
  5. Start a t2 instance:
    1. get t2
      aws-get-t2
    2. start
      aws-start
      • If you have trouble at this step, go to aws.amazon.com and navigate to EC2, right click and start the instance you want. Then return to your bash window
    3. get ip (copy for later)
      aws-ip
    4. start secure shell
      aws-ssh
  6. Start a notebook by copying the IP address you just printed and adding :8888 to the end in your browser (n.u.m.b.e.r.s:8888). The terminal/cygwin window will turn into a notebook status logger.
  7. In terminal, go to top right pane to set up an ssh bash shell to the instance
    ctrl-b "up arrow"
    1. Navigate to your home course directory and to the course/setup folder
    2. Activate the command aliases
      source aws-alias.sh
    3. Get that window to get the t2 details
      aws-get-t2
    4. Get the IP address
      aws-ip
    5. SSH in
      aws-ssh
  8. Clone the project repo
    git clone https://github.com/breadley/learning_machine
    To save any changes, go into learning_machine folder:
    git add *
    git commit -m 'message note'
    git push origin master

1. Update AWS instance

Description:

  • Get project files up to date on the AWS

Steps:

  1. In terminal, go to top right pane to set up an ssh bash shell to the instance
    ctrl-b "up arrow"
    1. Navigate to your home course directory and to the course/setup folder
    2. Activate the command aliases
      source aws-alias.sh
    3. Get that window to get the t2 details
      aws-get-t2
    4. Get the IP address
      aws-ip
    5. SSH in
      aws-ssh
  2. Clone the project repo
    git clone https://github.com/breadley/learning_machine
    To save any changes, go into learning_machine folder:
    git add *
    git commit -m 'message note'
    git push origin master
  3. The left panel can be used for navigating local files

In [ ]: