Skip to content

Commit

Permalink
Updated Labs
Browse files Browse the repository at this point in the history
Include Getting Started
First Time Shipped
Shipped Bootstrap Spark
  • Loading branch information
dorlok committed May 17, 2016
1 parent 2679b2f commit ca622bb
Show file tree
Hide file tree
Showing 52 changed files with 135 additions and 135 deletions.
34 changes: 17 additions & 17 deletions labs/shipped-bootstrap-spark/1.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
# Shipped 5 - Bootstrap Spark Project

## Introduction
Cisco Spark helps modern teams work together. Sign in to create rooms with group messaging, content sharing, video calling, and desktop sharing.

Cisco Spark provides us developer platform using rest api with which we have created a sample application. To know more click on - <a href="https://github.com/CiscoCloud/shipped-buildpack-template-spark" target="_blank">Cisco Spark Buildpack Template</a>.
Cisco Spark helps modern teams work together. Sign in to Spark to create rooms with group messaging, content sharing, video calling, and desktop sharing.

Cisco Spark provides a developer platform using REST API. You can jump start your project using a sample Spark application. Click <a href="https://github.com/CiscoCloud/shipped-buildpack-template-spark" target="_blank">Cisco Spark Buildpack Template</a> to learn more.


## Objectives

You will learn how to:

- Bootstrap Spark Sample Application using Shipped
- Completion time : 10 min approx
- Completion time: 10 minutes (approximately)

## Prerequisites

- Github Login Account
- Spark API token to login to our sample Spark app, after bootstrap.
- Github login account
- Spark API token to log in to our sample Spark app (after bootstrap).

## References
- Cisco Spark: Shipped Buildpack demo video (10 min), please follow <a href="https://cisco.webex.com/cisco/ldr.php?RCID=98837d3fbf139ce537e8f11a660ccff0" target="_blank" >video link here</a>.
- Walkthrough Cisco Shipped to create, build and deploy project,<a href="http://shipped-cisco.com/shipped/api-docs/build/index.html#walkthroughs" target="_blank">click here</a>.
- <a href="https://github.com/CiscoCloud/Shipped-Learning-Labs/blob/master/labs/shipped-quick-start/1.md" target="_blank">Quick Start with Cisco Shipped</a> reference guide.

## To Bootstrap a project with Spark

1. We need to create project in Shipped using Spark buildpack, refer to Getting Started section of Shipped document: <a href="http://shipped-cisco.com/shipped/api-docs/build/index.html#walkthroughs" target="_blank">Click here</a>

Note : We need to make a small change at service creation step, just select "Cisco Spark" Buildpack under API tab.
- Cisco Spark: Watch a 10-minute <a href="https://cisco.webex.com/cisco/ldr.php?RCID=98837d3fbf139ce537e8f11a660ccff0" target="_blank" >Shipped Buildpack demo video</a>.
- <a href="http://shipped-cisco.com/shipped/api-docs/build/index.html#walkthroughs" target="_blank">Walkthrough Cisco Shipped</a> to create, build and deploy project.
- <a href="https://github.com/CiscoCloud/Shipped-Learning-Labs/blob/master/labs/shipped-quick-start/1.md" target="_blank">Quick Start with Cisco Shipped</a> reference guide.

![](assets/add-spark-api.png)
## To Bootstrap a Project with Spark
1. Create a project in Shipped using Spark buildpack, see the <a href="http://shipped-cisco.com/shipped/api-docs/build/index.html#walkthroughs" target="_blank">Getting Started section of Shipped document</a>.
2. Select **Cisco Spark** buildpack under the **API** tab.

Rest project creation and deployment section will remain same, <a href="https://ciscoshipped.io/shipped/api-docs/build/index.html#5.-build-your-project" target="_blank">more detail.</a>
![](assets/add-spark-api.png)

**next** : How to use sample app.
**Note**: The process for creating and deploying your project remains the same as described in <a href="https://github.com/CiscoCloud/Shipped-Learning-Labs/blob/master/labs/shipped-quick-start/1.md" target="_blank">Quick Start with Cisco Shipped</a>.
42 changes: 22 additions & 20 deletions labs/shipped-bootstrap-spark/2.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
# How to use Sample Application

1. Once application is up and running, following screen will appear. It requires a <code>auth token</code>, which can be retrieved by logging into <a href="https://developer.ciscospark.com/" target="_blank">developer spark</a>.

![](assets/1_1.PNG)


2. You can paste here the copied token and login to application.

![](assets/1_2.png)

3. After adding a valid token to application, Sample app fetches all rooms associated from that token.

![](assets/1_3.png)
You need an <code>auth token</code> to access the sample application.

1. Log in to <a href="https://developer.ciscospark.com/" target="_blank">developer spark</a> to retrieve the token.
When the application is up and running, the following screen appears.

![](assets/developer-spark.PNG)


2. Copy the token and paste it here, then click **Add**.

![](assets/add-token.png)

3. Click **Login**.
After adding a valid token to application, the sample app fetches all rooms associated with that token.

![](assets/sample-app.png)

4. Features included

- Create New Rooms
- Send message to any old rooms.
- Logout from current account.
From this page, you can do the following:
- Create New Rooms
- Send message to any old rooms
- Logout from current account


## Cisco Spark Support
Send us an email to open a private ticket. <a href="mailto:[email protected]">[email protected]</a>
Or You can also join our dev support Spark room **#spark4devs**
Send <a href="mailto:[email protected]">us</a> an email to open a private ticket,
or join our dev support Spark room **#spark4devs**.
Binary file removed labs/shipped-bootstrap-spark/assets/1_1.PNG
Binary file not shown.
Binary file removed labs/shipped-bootstrap-spark/assets/1_2.png
Binary file not shown.
Binary file removed labs/shipped-bootstrap-spark/assets/1_3.png
Binary file not shown.
Binary file added labs/shipped-bootstrap-spark/assets/add-token.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion labs/shipped-bootstrap-spark/shipped-bootstrap-spark.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"time": "10",
"files": [
{"title": "1.md"}
{"title": "2.md"}
],
"tags": [
{"title": "Shipped"},
Expand Down Expand Up @@ -50,4 +51,4 @@
"title": "Shipped 9 - Managing Users"
}
]
}
}
29 changes: 14 additions & 15 deletions labs/shipped-first-time/1.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ Completion time: 5 minutes

## Prerequisites

- A <a href="http://github.com" target="_blank">GitHub</a> account.
- Setting up git on your local machine, first time set up (optional) : <a href="https://help.github.com/articles/set-up-git/#setting-up-git" target="_blank"> click here.</a>
Set up git on your local machine. <a href="https://help.github.com/articles/set-up-git/#setting-up-git" target="_blank"> Click here</a> for first time set up (optional).





## References
Expand All @@ -29,30 +31,27 @@ You can open these references in a separate tab and refer to them during this La

## Connect to GitHub

1. In a browser, go to <a href="https://ciscoshipped.io">https://ciscoshipped.io</a> and sign up.

You can use Shipped with any modern browser, but for optimal results, Chrome is recommended.
1. In a browser, go to <a href="https://ciscoshipped.io">https://ciscoshipped.io</a> and sign up.
You can use Shipped with any modern browser, but for optimal results, Chrome is recommended.

![](posts/files/shipped-first-time/assets/sign-up-github.png)
![](assets/sign-up-github.png)


1. Click **Sign up with GitHub**.

2. Click **Sign up with GitHub**.
The GitHub site opens in your browser.

3. Within the GitHub page, click **Authorize application**. You only need to do this the first time you use Shipped.

![](posts/files/shipped-first-time/assets/authorize.jpg)

![](assets/authorize.jpg)


The Shipped UI opens.
The Shipped UI opens.

You can now run Shipped in three ways:

1. the UI - the easiest method and works on all platforms, although Chrome is recommended.
2. the API - usually for scripting and advanced users.
3. the CLI - within a Terminal window (Linux) or Command Prompt (Windows), navigate to your project directory and type <code>shipped console</code>. Enter the CLI commands from there.
1. UI - the easiest method and works on all platforms, although Chrome is recommended.
2. API - usually for scripting and advanced users.
3. CLI - within a Terminal window (Linux) or Command Prompt (Windows), navigate to your project directory and type <code>shipped console</code>. Enter the CLI commands from there.

Specific actions for each of these methods is described in the related Learning Labs.
**Note**: Refer to the related Learning Labs for each of these methods.

38 changes: 16 additions & 22 deletions labs/shipped-quick-start/1.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,26 @@
#Shipped 2 - Quick Start Labs
## Sign into Shipped / Create an Account on GitHub


You need a user account in Github. To create a new github account, go to <a href="https://github.com/join" target="_blank">GitHub</a>, and register yourself.
If you already have a Github account, you are ready to build and deploy your first project on Shipped.

This lab will get you quickly up and running on Shipped.
**Note:** You can use Shipped with any modern browser. For optimal results, Chrome is recommended.

## Sign into Shipped / Create an account on GitHub
1. Open a browser, navigate to <a href="https://ciscoshipped.io/" target="_blank">Shipped</a>.
The Signup page open.

Pre-requirement is one Github Account, If you already have github account, then you are ready to Build and Deploy your first project on Shipped.
or Else You have to create a User Account in Github.
![](assets/sign-up-github.png)

To create new github account navigate to <a href="https://github.com/join" target="_blank">GitHub</a>, and register yourself.

You can use Shipped with any modern browser, but for optimal results, Chrome is recommended.
2. Click **Sign up with Github**. Shipped checks Github for your credentials.

1. In the browser navigate to <a href="https://ciscoshipped.io/" target="_blank">Shipped</a>.
![](assets/authorize.PNG)

The Signup page open.
3. Click **Authorize application** (you only need to do this the first time you use Shipped).
You are redirected to the Create Your Project form.

![](assets/1_1.png)

2. Click **Sign Up with Github**. Shipped checks Github for your credentials.
![](assets/create-project.PNG)

Unless you're currently logged into GitHub, the GitHub sign in page opens. This requires only for the first time user.

![](assets/1_2.PNG)

3. You will be redirected to Create Project Page.
You are ready to compose your new project in Shipped.

![](assets/1_3.PNG)
**Note**: If you've already created a Shipped project, Shipped shows information about your project instead of the above form. You can continue working with that project or create a new project.

Note: If you've already created a Shipped project, Shipped will show information about that project instead of above form. You can continue working with that project, or create a new project.

You are ready to go for Compose new project in Shipped.
53 changes: 30 additions & 23 deletions labs/shipped-quick-start/2.md
Original file line number Diff line number Diff line change
@@ -1,56 +1,63 @@
## Create your first project with Shipped
## Create your First Project with Shipped

1. Enter your new project name, then click **Start Composing**. For this example, we are using "MyFirstShippedProject".
1. Enter your new project name, **MyFirstShippedProject** for example, then click **Start Composing**.

![](assets/2_1.PNG)
![](assets/create-first-project.PNG)

2. The **Compose Your Project** page appears.
![](assets/2_2.PNG)
The **Compose Your Project** page opens, displaying your project name.

![](assets/compose-project-service.PNG)

3. Determine the service you want to include in your project.
3. Select the service you want to include in your project.

![](assets/2_3.PNG)
<table border="1">

<table border="1">
<tbody>
<tr>
<td>Service</td>
<td>Description</td>
</tr>
<tr>
<td>Develop</td>
<td> It has various pre-defined development frameworks, which enable you to quickly build a generic project or you can choose any existing project from your Github account.</td>
<td> Contains various pre-defined development frameworks, enabling you to quickly build a generic project or to choose any existing project from your Github account.</td>
</tr>
<tr>
<td>Docker Hub</td><td>Search any Docker Hub images here.</td>
<td>Docker Hub</td><td>Allows you to search any Docker Hub images.</td>
</tr>
<tr>
<td>Cisco</td><td>It has pre developed web apps using Cisco other project rest api, Such as Tropo, CMX, APIC-EM..</td>
<td>Cisco</td><td>Contains pre developed web apps using Cisco other project REST API, such as Tropo, CMX, APIC-EM.</td>
</tr>
<tr>
<td>Data stores</td><td>It includes Database Such as Mysql, Cassandra, MongoDB etc.</td>
<td>Data stores</td><td>Includes database such as Mysql, Cassandra, MongoDB, and so forth.</td>
</tr>
<tr>
<td>Message Queue</td><td>It includes Queuing Services such as kafka, RabbitMQ etc.</td>
<td>Message Queue</td><td>Includes Queuing Services such as kafka, RabbitMQ, and so forth.</td>
</tr>
</tbody>
</table>

4. Select **golang** development framework for this example.

![](assets/compose-project.PNG)

4. For this example, Let select Golang development framework, Enter Service name as "goHelloWorld".
4. Enter **goHelloWorld** for the service name.

![](assets/2_4.PNG)

5. Select Github Organization, By Default Choose Your default, then Click **Add Service**.
![](assets/golang.PNG)

Note : You can add multiple services here if you want.
5. Select the Github Organization (it's your account by default), then click **Add Service**.
Shipped builds the project and sets up the GitHub repositories. The progress bar is displayed while the project is building.
![](assets/golang-hello-world.PNG)

![](assets/2_5.PNG)
6. Click **Save Project**.
Your Shipped project is now created and displayed.

6. Click **Save Project**.
![](assets/save-project.png)

Shipped builds the project and sets up the GitHub repositories. While building, the progress bar is shown.
6. To add multiple services, click **Build**, then follow steps 2 through 6 above.

When finished, your Shipped project has been created.
![](assets/create-mulit-services.png)

34 changes: 18 additions & 16 deletions labs/shipped-quick-start/3.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
# Building your first project
# Building your First Project

1. Once you click on **Save Project**, you will be redirected to dashboard tab.
You are now redirected to the dashboard tab, showing the events of your project. At the backend, Shipped creates a Github repository and adds a few project related files to it.

![](assets/3_1.PNG)
![](assets/build--project.png)

and at backend Shipped will create Github repository and also add few project related files to it. Now go to your Github account and Search for "goHelloWorld" repo and view project folder. With this, Shipped adds a private repo to Drone to build your project.
1. Go to your Github account and search for **goHelloWorld** repo.

![](assets/3_0.PNG)

Note : These files are responsible for Build and Run your project. You can have a look at these files Added by Shipped : Docker File, Drone.sec, Drone.yml and .shipped (folder).

2. Now **Click to Build Tab** and see the progress of your first build.

You can see the build logs at right hand side, On Left hand side status of project build, Currently its in "In Progress" status.
2. View the project folder; Shipped adds a private repo to Drone to build your project.
**Note**: Shipped adds the **.shipped** folder and the following files that are responsible for building and running your project: **Drone.sec**, **Drone.yml**, and **Dockerfile**.

![](assets/3_2.PNG)
![](assets/hello-world-code.png)

3. Click the **Build** tab and observe the progress of your first build.
The build logs appear on the right and the status of project build on the left. The project is in the **In-Progress** state as indicated by the yellow circle.

![](assets/build-log.png)

When your build status changes to the **Passed** status, your first build is ready to deploy.

![](assets/test3.PNG)

**Note**: If the build status is "Failed," see the details on the right and verify that your project code is buildable.

3. After Sometime, Your build status will get changed to either "Passed" or "Failed" status.

In case of failed status you need to verify if your project code is buildable or not, you can see more details on right hand side build logs. As of now in our case Build gets "Passed"

![](assets/3_3.PNG)


Now your first build is ready to deploy.
Loading

0 comments on commit ca622bb

Please sign in to comment.