-
Notifications
You must be signed in to change notification settings - Fork 180
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merged PR 156215: add legal info; update use and contributor guidance
* Update README.md and CONTRIBUTING.md with usage and contribution info. * Update legal and other metadata per open source publishing guidance. Related work items: #752891
- Loading branch information
Josh Gavant
committed
Jan 2, 2019
1 parent
7c4a2f5
commit 28912b7
Showing
3 changed files
with
185 additions
and
59 deletions.
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,36 +1,98 @@ | ||
We welcome all contributions to the Oryx project: documentation, bug reports, | ||
feature requests and source code. Please submit these using GitHub issues and | ||
pull requests. | ||
# Contents | ||
|
||
To build and test the project, install the following prerequisites and run the | ||
following scripts. | ||
1. [Contributing](#contributing) | ||
1. [Architecture](#architecture) | ||
|
||
## Prerequisites | ||
# Contributing | ||
|
||
- bash v4.4 | ||
- dotnet v2.1 | ||
- docker v18.06.1-ce. This is the version used in CI too. We want a consistent | ||
version across development and CI to avoid surprises. | ||
- Golang 1.11 (for the startup command generators only) | ||
We welcome all contributions to the Oryx project: questions and answers, bug | ||
reports, feature requests and source code. Please submit these using GitHub | ||
issues and pull requests. | ||
|
||
Most contributions require you to agree to a Contributor License Agreement | ||
(CLA) declaring that you have the right to, and actually do, grant us the | ||
rights to use your contribution. For details, visit | ||
<https://cla.microsoft.com>. | ||
|
||
When you submit a pull request, a bot will determine whether you need to | ||
provide a CLA and decorate the PR appropriately (e.g., label, comment). | ||
Simply follow the instructions provided by the bot. You will only need to do | ||
this once across all repositories using our CLA. | ||
|
||
## Conduct | ||
|
||
Run these scripts from the repo root: | ||
This project has adopted the [Microsoft Open Source Code of | ||
Conduct](https://opensource.microsoft.com/codeofconduct/). For more | ||
information see the [Code of Conduct | ||
FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact | ||
[opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional | ||
questions or comments. | ||
|
||
- Build build image: `./build/build-buildimages.sh` | ||
- Build runtime images: `./build/build-runtimeimages.sh` | ||
- Build and test build image: `./build/test-buildimages.sh` | ||
- Build and test runtime images: `./build/test-runtimeimages.sh` | ||
- Build and test build and runtime images and other tests: `./build.sh` | ||
# Architecture | ||
|
||
## Repo Contents | ||
The system comprises *Build* and *Run* images. **Build** images include | ||
compilers, libraries, headers and other tools necessary to prepare artifacts; | ||
**Run** images are smaller and contain only components required to run | ||
programs. | ||
|
||
* `build`: scripts for building the script generator and build and runtime | ||
images | ||
After the generated build script runs, artifacts are exported as files from | ||
the Build image to be mounted into the Run image or added to a derived | ||
container in a Dockerfile. | ||
|
||
Another script generator in Run images generates a script to start the app | ||
correctly. | ||
|
||
## Repo structure | ||
|
||
* `build`: scripts for building the script generator and build and runtime images | ||
* `images`: Dockerfiles for the build and runtime images | ||
* `src`: source code for the build script generator and startup command generators | ||
* `src`: source code for the build and startup script generators | ||
* `tests`: tests. | ||
* `vsts`: CI/CD configuration. | ||
|
||
## Script generators | ||
|
||
A key element of the Build image is the | ||
[BuildScriptGenerator](./src/BuildScriptGenerator), which analyzes the | ||
codebase and prepares an appropriate build script. A key element of the Run | ||
image is the [StartupScriptGenerator](./src/startupscriptgenerator), which | ||
analyzes the codebase and prepares an appropriate start script. | ||
|
||
## Images | ||
|
||
The `build` image manifest is at | ||
[./images/build/Dockerfile](./images/build/Dockerfile). It is built and | ||
published via the Microsoft Container Registry (MCR) ([info][]) as | ||
`mcr.microsoft.com/oryx/build` and syndicated to Docker Hub as | ||
[index.docker.io/oryxprod/build:latest][]. Pull with `docker pull | ||
mcr.microsoft.com/oryx/build:latest`. | ||
|
||
[info]: https://azure.microsoft.com/en-us/blog/microsoft-syndicates-container-catalog/ | ||
[index.docker.io/oryxprod/build:latest]: https://hub.docker.com/r/oryxprod/build | ||
[index.docker.io/microsoft/oryx-build]: https://hub.docker.com/r/microsoft/oryx-build | ||
|
||
The *Run* images are defined in [`./images/runtime`](./images/runtime) and | ||
published to MCR and Docker Hub as well at | ||
<https://hub.docker.com/u/oryxprod>. | ||
|
||
**TODO**: include a couple examples of pulling run images once repo location | ||
is final. | ||
|
||
## Prerequisites | ||
|
||
The following are required to run and test this project locally. | ||
|
||
- bash v4.4 | ||
- dotnet v2.1 | ||
- go 1.11+ (for startup script generator) | ||
- docker v18.06.1-ce | ||
|
||
## Golang | ||
# Go (Golang) | ||
|
||
The startup command generators are written in Go. If you're going to work with them, it will be helpful | ||
to have the Go SDK installed. You won't need it to build the runtime images, since the tools are build inside the docker containers using the golang base image. | ||
The startup script generator is written in Go to reduce storage space | ||
required. Nevertheless you don't have to install Go to build this project | ||
since it's available in the build containers. | ||
|
||
Set the `GOPATH` variable to include the Oryx repo, e.g. `GOPATH=$GOPATH:c:\src\oryx`. Since the applications are inside the `src` folder there, Go should be able to find the packages and produce builds. | ||
Set the `GOPATH` variable to include the Oryx repo, e.g. | ||
`GOPATH=$GOPATH:c:\src\oryx`. Since the applications are inside the `src` | ||
folder there, Go should be able to find the packages and produce builds. |
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
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