-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documentation wip #2
Open
AL-SparkGeo
wants to merge
11
commits into
master
Choose a base branch
from
documentation_wip
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
9f738ca
created documentation template
AL-SparkGeo cebdf63
Update README.md
AL-SparkGeo 1b2682d
Update README.md
AL-SparkGeo 5822b19
Update README.md
AL-SparkGeo be18c41
Update README.md
AL-SparkGeo fcfec43
Update README.md
AL-SparkGeo c8cec67
Update README.md
AL-SparkGeo 4064aa3
removed unnecessary images (leftovers)
AL-SparkGeo e9cb3e8
Update README.md
AL-SparkGeo 2da7715
Update README.md
AL-SparkGeo 04dccd7
Delete README_old.md
AL-SparkGeo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,46 @@ | ||
# Terradactile | ||
<br /> | ||
<p align="center"> | ||
<a href="https://github.com/sparkgeo/template-barebones"> | ||
<img src="./images/sparkgeo-logo.png" width="100"> | ||
</a> | ||
<h3 align="center">Terradactile Lambda</h3> | ||
</p> | ||
|
||
|
||
<!-- TABLE OF CONTENTS --> | ||
### Table of Contents | ||
|
||
* [About this Program](#about-the-project) | ||
* [Getting Started](#getting-started) | ||
* [Prerequisites](#prerequisites) | ||
* [Installation and Deployment](#installation-and-deployment) | ||
* [Usage](#usage) | ||
* [Contact](#contact) | ||
|
||
|
||
<!-- ABOUT THE PROJECT --> | ||
# About This Program | ||
|
||
Terradactile is an API and Lambda function for fetching, assembling, and processing elevation data. | ||
|
||
This project contains source code and supporting files for a serverless application that you can deploy with the SAM CLI. It includes the following files and folders. | ||
|
||
- terradactile/terradactile - Code for the application's Lambda function. | ||
- terradactile/template.yaml - A template that defines the application's AWS resources. **Update the environment variables for BUCKET and ALLOWED_ORIGINS.** | ||
File Contents | ||
|
||
- `terradactile/terradactile` - Code for the application's Lambda function. | ||
- `terradactile/template.yaml` - A template that defines the application's AWS resources. | ||
|
||
The application uses several AWS resources, including Lambda functions and an API Gateway API. These resources are defined in the `template.yaml` file in this project. You can update the template to add AWS resources through the same deployment process that updates your application code. | ||
**Update the environment variables for BUCKET and ALLOWED_ORIGINS.** | ||
|
||
Sample .env file: | ||
``` | ||
export BUCKET=myBucket | ||
export ALLOWED_ORIGINS=* | ||
``` | ||
|
||
|
||
|
||
<!-- GETTING STARTED --> | ||
# Getting Started | ||
|
||
If you prefer to use an integrated development environment (IDE) to build and test your application, you can use the AWS Toolkit. | ||
The AWS Toolkit is an open source plug-in for popular IDEs that uses the SAM CLI to build and deploy serverless applications on AWS. The AWS Toolkit also adds a simplified step-through debugging experience for Lambda function code. See the following links to get started. | ||
|
@@ -17,23 +50,36 @@ The AWS Toolkit is an open source plug-in for popular IDEs that uses the SAM CLI | |
* [VS Code](https://docs.aws.amazon.com/toolkit-for-vscode/latest/userguide/welcome.html) | ||
* [Visual Studio](https://docs.aws.amazon.com/toolkit-for-visual-studio/latest/user-guide/welcome.html) | ||
|
||
## Deploy the application | ||
|
||
The Serverless Application Model Command Line Interface (SAM CLI) is an extension of the AWS CLI that adds functionality for building and testing Lambda applications. It uses Docker to run your functions in an Amazon Linux environment that matches Lambda. It can also emulate your application's build environment and API. | ||
### Prerequisites | ||
|
||
To use the SAM CLI, you need the following tools. | ||
|
||
* SAM CLI - [Install the SAM CLI](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install.html) | ||
* [Python 3 installed](https://www.python.org/downloads/) | ||
* Docker - [Install Docker community edition](https://hub.docker.com/search/?type=edition&offering=community) | ||
|
||
|
||
The application uses several AWS resources, including Lambda functions and an API Gateway API. These resources are defined in the `/terradactile/template.yaml` file in this project. You can update the template to add AWS resources through the same deployment process that updates your application code. | ||
|
||
|
||
# Installation and Deployment | ||
|
||
## Deployment | ||
|
||
The Serverless Application Model Command Line Interface (SAM CLI) is an extension of the AWS CLI that adds functionality for building and testing Lambda applications. It uses Docker to run your functions in an Amazon Linux environment that matches Lambda. It can also emulate your application's build environment and API. | ||
|
||
To build and deploy your application for the first time, cd to the project directory and run the following in your shell: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What directory are you |
||
|
||
|
||
```bash | ||
cd terradactile-lambda/terradactile/terradactile/ | ||
sam build --use-container | ||
sam deploy --guided | ||
``` | ||
|
||
|
||
<!-- USAGE EXAMPLES --> | ||
# Usage | ||
The first command will build the source of your application. The second command will package and deploy your application to AWS, with a series of prompts: | ||
|
||
* **Stack Name**: The name of the stack to deploy to CloudFormation. This should be unique to your account and region, and a good starting point would be something matching your project name. | ||
|
@@ -51,3 +97,15 @@ To delete the sample application that you created, use the AWS CLI. Assuming you | |
```bash | ||
aws cloudformation delete-stack --stack-name terradactile | ||
``` | ||
|
||
<!-- CONTACT --> | ||
# Contact | ||
|
||
Project Link: [https://github.com/sparkgeo/terradactile-lambda/](https://github.com/sparkgeo/terradactile-lambda/) | ||
|
||
Readme template edited by Alex Leamy at SparkGeo Consulting Ltd. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's remove this edited component |
||
|
||
Based off original template from [Othniel Drew](https://github.com/othneildrew/Best-README-Template) | ||
|
||
|
||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider making this more explicit by adding a
.env-example
file with those in it. Or use a code block here such as: