Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.

Commit f4aed58

Browse files
committed
added code structure
1 parent a6130a5 commit f4aed58

File tree

1 file changed

+34
-2
lines changed

1 file changed

+34
-2
lines changed

README.md

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ The scenarios are accomplished by using:
3030
- [TripIt Developer API](https://www.tripit.com/developer)
3131
- [FlightStats Developer API](https://developer.flightstats.com)
3232

33-
3433
## Prerequisites
3534

3635
Register and obtain the [FlightStats Developer API](https://developer.flightstats.com/signup) and [TripIt Developer API](https://www.tripit.com/developer/create) to query flight status.
@@ -54,6 +53,39 @@ Otherwise, fill in the **OpenWhisk Auth** variable to enable serverless for your
5453
Then, click **View logs and history** in your pipeline to access your application via the URL link at the end of your logs.
5554

5655

56+
## Code Structure
57+
58+
### Cloud Foundry application
59+
60+
| File | Description |
61+
| ---------------------------------------- | ---------------------------------------- |
62+
| [flightassist.js](flightassist.js) | Main application, start the express web server and calling the major AJAX functions|
63+
| All Javascript files (*.js) | The implementation of the flightstats, tripIt, and weather information, shared by all deployment options |
64+
| [package.json](package.json) | List the packages required by the application |
65+
| [manifest.yml](manifest.yml) | Description of the application to be deployed |
66+
67+
### Kubernetes deployment with microservices
68+
69+
| File | Description |
70+
| ---------------------------------------- | ---------------------------------------- |
71+
| [flightassist.js](flightassist.js) | Main application, start the express web server and calling the major AJAX functions|
72+
| All Javascript files (*.js) | The implementation of the flightstats and tripIt information, shared by all deployment options |
73+
| [app.py](flightassist-weather/scr/app.py) | Weather Microservice, query and sent weather information to the main application |
74+
| [package.json](package.json) | List the packages required by the application |
75+
| [Dockerfile.local](Dockerfile.local) and [Dockerfile.alpine](flightassist-weather/Dockerfile.alpine) | Description of the Docker image |
76+
| [flightassist.yaml](flightassist.yaml) and [secret.yaml](secret.yaml)| Specification file for the deployment of the service and secret in Kubernetes |
77+
78+
### Kubernetes deployment with serverless
79+
80+
| File | Description |
81+
| ---------------------------------------- | ---------------------------------------- |
82+
| [flightassist.js](flightassist.js) | Main application, start the express web server and calling the major AJAX functions|
83+
| [weather.js](weather.js) | Trigger actions in OpenWhisk to get the weather information |
84+
| All Javascript files (*.js) | The implementation of the flightstats and tripIt information, shared by all deployment options |
85+
| [package.json](package.json) | List the packages required by the application |
86+
| [Dockerfile.local](Dockerfile.local) | Description of the Docker image |
87+
| [flightassist_serverless.yaml](flightassist_serverless.yaml) and [secret.yaml](secret.yaml)| Specification file for the deployment of the service and secret in Kubernetes |
88+
5789
# Steps
5890
1. [Create your Cloudant Database and Insights for Weather Service](#1-create-your-cloudant-database-and-insights-for-weather-service)
5991
2. [Deployment Scenarios](#2-deployment-scenarios)
@@ -173,7 +205,7 @@ bx cs cluster-service-bind {your-cluster-name} default mycloudant
173205
bx cs cluster-service-bind {your-cluster-name} default myweatherinsights
174206
```
175207

176-
Next, modify the secret.yaml file with **flightstats-app-id**, **flightstats-app-key**, **tripit-api-key**, and **tripit-api-secret**.
208+
Next, create secret to give FlightStats and TripIt API credentials for Flightassist. Modify the secret.yaml file with **flightstats-app-id**, **flightstats-app-key**, **tripit-api-key**, and **tripit-api-secret**.
177209

178210
Then, edit the `flightassist.yaml` and replace the ```<namespace>``` with your own namespace. You can obtain your namespace by running `bx cr namespace`. Also replace `<your-app-end-point-url>` with your node ip and nodeport (e.g. 169.47.237.139:30080). You can obtain your IP by running `kubectl get nodes` and your nodeport is 30080.
179211

0 commit comments

Comments
 (0)