This repository has been archived by the owner on Nov 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds introduction.md as well as syncs all the documentation from /docs to gh-pages.
- Loading branch information
Showing
4 changed files
with
158 additions
and
0 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
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 |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# Simplifying how you define Kubernetes artifacts | ||
{: .center-text } | ||
## Use Kedge to deploy applications with sensible defaults | ||
{: .center-text } | ||
|
||
### What's Kedge? | ||
|
||
Kedge is a simple, easy and declarative way to define and deploy applications to Kubernetes by writing very concise application definitions. | ||
|
||
Why do people love Kedge? | ||
|
||
- __Declarative:__ Declarative definitions specifying developer's intent. | ||
- __Simplicity:__ Using a simple and concise specification that is easy to understand and define. | ||
- __Concise:__ Define just the necessary bits and Kedge will do the rest. Kedge will interprolate and pick the best defaults for your application to run on Kubernetes. | ||
- __Multi-container environments:__ Define your containers, services and applications in one simple file, or split them into multiple files. | ||
- __Familiar structure:__ Using a familiar YAML structure as Kubernetes, it's easy to pick-up and understand Kedge. | ||
- __Built on top of Kubernetes Pod definition:__ Leverages Kuberenetes Pod definition (PodSpec) and avoids leaky abstractions. | ||
|
||
### Avoid writing long artifact files, deploy an application straight to a Kubernetes cluster | ||
|
||
```yaml | ||
name: httpd | ||
containers: | ||
- image: centos/httpd | ||
services: | ||
- name: httpd | ||
type: NodePort | ||
ports: | ||
- port: 8080 | ||
targetPort: 80 | ||
``` | ||
{: .demo-code } | ||
![Demo Gif](/img/demo.gif) | ||
{: .demo-gif } | ||
View our [file reference](/file-reference) for a complete overview on what Kedge can do. | ||
### Install and deploy on Linux, macOS or Windows | ||
Install Kedge with our simple binary! | ||
```sh | ||
# Linux | ||
curl -L https://github.com/kedgeproject/kedge/releases/download/v0.2.0/kedge-linux-amd64 -o kedge | ||
|
||
# macOS | ||
curl -L https://github.com/kedgeproject/kedge/releases/download/v0.2.0/kedge-darwin-amd64 -o kedge | ||
|
||
chmod +x kedge | ||
sudo mv ./kedge /usr/local/bin/kedge | ||
``` | ||
|
||
For Windows users, download from the [GitHub release](https://github.com/kedgeproject/kedge/releases/download/v0.2.0/kedge-windows-amd64.exe) and add the binary to your PATH. | ||
|
||
### Pick from an example and see what Kedge is all about | ||
|
||
Choose from multiple Kedge examples to deploy: | ||
|
||
- [Wordpress](https://github.com/kedgeproject/kedge/tree/master/examples/wordpress) | ||
- [GitLab](https://github.com/kedgeproject/kedge/tree/master/examples/gitlab) | ||
- [Kubernetes Guestbook](https://github.com/kedgeproject/kedge/tree/master/examples/guestbook-demo) |
Binary file not shown.
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 |
---|---|---|
@@ -0,0 +1,92 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Ensures that we run on Travis | ||
if [ "$TRAVIS_BRANCH" != "master" ] || [ "$BUILD_DOCS" != "yes" ] || [ "$TRAVIS_SECURE_ENV_VARS" == "false" ] || [ "$TRAVIS_PULL_REQUEST" != "false" ] ; then | ||
echo "Must be: a merged pr on the master branch, BUILD_DOCS=yes, TRAVIS_SECURE_ENV_VARS=false" | ||
exit 0 | ||
fi | ||
|
||
DOCS_REPO_NAME="kedge" | ||
DOCS_REPO_URL="[email protected]:kedgeproject/kedge.git" | ||
DOCS_KEY="scripts/deploy_key.enc" | ||
DOCS_USER="kedge-bot" | ||
DOCS_EMAIL="[email protected]" | ||
DOCS_BRANCH="gh-pages" | ||
DOCS_FOLDER="docs" | ||
ENC_KEY=$encrypted_91569b511922_key | ||
ENC_IV=$encrypted_91569b511922_iv | ||
|
||
# decrypt the private key | ||
openssl aes-256-cbc -K $ENC_KEY -iv $ENC_IV -in "$DOCS_KEY.enc" -out "$DOCS_KEY" -d | ||
chmod 600 "$DOCS_KEY" | ||
eval `ssh-agent -s` | ||
ssh-add "$DOCS_KEY" | ||
|
||
# clone the repo | ||
git clone "$DOCS_REPO_URL" "$DOCS_REPO_NAME" | ||
|
||
# change to that directory (to prevent accidental pushing to master, etc.) | ||
cd "$DOCS_REPO_NAME" | ||
|
||
# switch to gh-pages and grab the docs folder from master | ||
git checkout gh-pages | ||
git checkout master docs | ||
|
||
# Remove README.md from docs folder as it isn't relevant | ||
rm docs/README.md | ||
|
||
# Use introduction.md instead as the main index page | ||
mv docs/introduction.md index.md | ||
|
||
# Check that index.md has the appropriate Jekyll format | ||
index="index.md" | ||
if cat $index | head -n 1 | grep "\-\-\-"; | ||
then | ||
echo "index.md already contains Jekyll format" | ||
else | ||
# Remove ".md" from the name | ||
name=${index::-3} | ||
echo "Adding Jekyll file format to $index" | ||
jekyll="--- | ||
layout: default | ||
--- | ||
" | ||
echo -e "$jekyll\n$(cat $index)" > $index | ||
fi | ||
|
||
# clean-up the docs and convert to jekyll-friendly docs | ||
cd docs | ||
for filename in *.md; do | ||
if cat $filename | head -n 1 | grep "\-\-\-"; | ||
then | ||
echo "$filename already contains Jekyll format" | ||
else | ||
# Remove ".md" from the name | ||
name=${filename::-3} | ||
echo "Adding Jekyll file format to $filename" | ||
jekyll="--- | ||
layout: default | ||
permalink: /$name/ | ||
redirect_from: | ||
- /docs/$name.md/ | ||
--- | ||
" | ||
echo -e "$jekyll\n$(cat $filename)" > $filename | ||
fi | ||
done | ||
cd .. | ||
|
||
# add relevant user information | ||
git config user.name "$DOCS_USER" | ||
|
||
# email assigned | ||
git config user.email "$DOCS_EMAIL" | ||
git add --all | ||
|
||
# Check if anything changed, and if it's the case, push to origin/master. | ||
if git commit -m 'Update docs' -m "Commit: https://github.com/kedgeproject/kedge/commit/$TRAVIS_COMMIT" ; then | ||
git push | ||
fi | ||
|
||
# cd back to the original root folder | ||
cd .. |