SDiOS Meeting: Using Git and Xcode with Amazon Cloud EC2 and Raspberry Pi Computers

On Monday, July 22, 2013, I co-presented a session with Adam Christianson at the SDiOS SIG at UCSD Extension in San Diego, California.

Note: No sooner did I Tweet the location of this blog post and I get an email about it already being favorited!

Our topic was, Git with Your Program, an introduction to Git consisting of lecture and demonstrations of Xcode, GUI Git Clients, interacting with inexpensive Amazon EC2 (AWS) and Raspberry Pi computers, and GitHub proper. I used a MacBook Pro running Mac OS X 10.8.4 for the presentation.

This post will cover my portion of the presentation: Using Xcode 4.6.3 and Terminal with Amazon EC2 and Raspberry Pi computers. I include here some of linked online materials (including window snapshots) used in my presentation.

Each pdf should be downloaded to your hard disk and then opened in Apple’s Preview or Adobe Reader application to display the thumbnails to use as referenced page numbers. Assumptions are made that you may follow the information with some of your own interpretations as required.

These documents are listed in their presented order in pdf format from the meeting:

0) Git Server Keynote Slides [with active links]

  1. Go through each slide (page) to review the presentation [ updated July 24, 2013 at 8:45 pm Pacific ]

==============================

00) Git Server Creation and Xcode Slides

Slides 1. Creating AWS EC2 Ubuntu Instance and Installing Git

  1. Page 1 shows Amazon AWS Login Page.
  2. On following pages that have a red bar displayed on the page it indicates where in the actual web browser (logged into AWS) the user should click on the link to proceed. Your server names and settings need to be personalized for your needs. Check the AWS Help for more information.
  3. Page 28 is the place where you find your public DNS address to connect with your new server.
  4. Page 29 shows an Apple’s Terminal window to issue a command line opening your newly created AWS server. The green highlight is used to indicate the commands you would execute. Again, your values are likely to be different.
  5. Page 30 indicates a successful connection to the new server.
  6. Page 31 and 32 shows the command to install Git on your server.
  7. Page 33 shows the logout command to exit the AWS Server.

Slides 2. Command Line Setting Up AWS Remote Repository

  1. The green highlight is used to indicate the commands you would execute to navigate your server, list files, and create new directories to use with Git Remote Repositories. A remote repository directory’s name always ends in ‘.git‘.
  2. Learn about the command: ‘git init – – bare‘ if you feel the need.
  3. The last page shows a ready to use git remote repository named ‘sdios_demo_2013_22_07.git‘ used at the SDiOS presentation.

Slides 3. Create Xcode Project, Commit to Local Repository

  1. Page 1 shows starting Xcode 4.6.3.
  2. Page 2 indicates selecting the option ‘Create a new Xcode project‘.
  3. Pages 3, 4, and 5 show:
    1. selecting the type of project
    2. naming and configuring it
    3. saving it to the project folder with the checkbox selected to create a local git workspace
  4. Pages 7 and 8 asks you to create a new empty file named ‘ReadMe‘ and saving it into the project folder.
  5. Page 9 shows the new read me document displayed in the Xcode project window navigation pane. The ‘A‘ next to the filename means Git understands this to be a newly added file.
  6. Pages 10 and 11 show the relocation of the ReadMe file and entry of a one line sentence into that document.
  7. Page 12 is the result of you:
    1. selecting the ‘File->Source Control->Commit…‘ menu item
    2. entering a salient comment to reflect the updated content
    3. clicking the ‘Commit‘ button
  8. Page 13 reflects that Git recognizes the files are accepted as staged into the Git local workspace.
  9. Page 14 shows the Terminal Window, changing the directory to the Xcode project, ‘SDiOS Git Demo‘ on the Desktop.
  10. Page 15 shows the command line executing:
    1. git remote add origin‘ and the path to the ‘Git Remote Repository‘ on the ‘AWS Server
    2. the command to list the contents of the current directory with the hidden  ‘.git’ directory orange highlighted.
  11. Page 16 shows the ‘origin‘ remote now selected and the username and Location at the bottom of the window.
  12. Page 17 is the result of you:
    1. selecting the File->Source Control->Push…’ menu item
    2. verifying the ‘origin/master(create)‘ is green-lighted to save your changes into the local workspace Git database
  13. Page 18 shows the Xcode project title in the left-hand column is selected revealing the history contained in the Git database for this project.

Slides 4. Command Line Local Access to Xcode Project [ Not Used ]

 Slides 5. Command Line and Xcode to Git Server Remote Repositories

  1. Page 1 shows:
    1. the command line to return to the Xcode project folder
    2. your issuance of the Git command, ‘git status’
  2. Page 2 shows:
    1. Xcode Organizer Repository with Xcode project selected
    2. Remotes selected with the ‘remote location path’ as shown indicating a new remote on a Raspberry Pi (Rpi) computer running Git. The same files from the Xcode project in the local workspace were previously pushed to the Rpi remote repository.
  3. Page 3 shows the:
    1. command line access to the AWS Server remote for the Xcode project
    2. indicating the result of the Git command: ‘git log
  4. Page 4 shows the:
    1. command line access to the Rpi Server remote for the Xcode project
    2. results of using the Git command: ‘git log –pretty=oneline

==============================

 01) Add Key to ssh and Set Permissions

  1. A document with some tips for notifying computer where the private keys are and that the permissions for the folder and files are set correctly.

==============================

02) Push Xcode Master to Raspberry Pi via Xcode

  1. A document describing, “Adding existing Xcode project to remote git Repo on Raspberry Pi computer.”

==============================

03) Xcode Clones

  1. Images of the Xcode approach to clone a project from a Git Server Remote Repository using the two following references:
    1.  How To Create Xcode Clones from AWS
    2.  How To Create Xcode Clones from Raspberry Pi

==============================

04) Xcode Remote Strings

  1. A document with some tips for entering the path strings to Git Remote Repositories in Xcode

==============================

05) Git Projects with Without Xcode

  1. A document describing how to use an, AWS Git Server Without Xcode
  2.  A document describing how to use a, Raspberry Pi Git Server Without Xcode

==============================

Be sure to stop your AWS Instances if you want to cease the hourly charges to run it.

After stopping your server, you may return later to easily start it up again. See the AWS Help pages for learning how to do that.

If you instead terminate the server, you’ll need to recreate it again a new.

Did you like this? Share it:

About Don Larson

Using computer technology since June 1980.
This entry was posted in Amazon Web Services, iOS, Newbound, Inc., Personal, Raspberry Pi, Technology. Bookmark the permalink.