Skip to content

Commit

Permalink
Merge pull request #19 from eclipse-iofog/release/1.2.0
Browse files Browse the repository at this point in the history
Release 1.2.0
  • Loading branch information
lkrcal committed Jul 16, 2019
2 parents 56c9871 + 1d182f0 commit 2d1c48d
Show file tree
Hide file tree
Showing 35 changed files with 3,078 additions and 102 deletions.
8 changes: 8 additions & 0 deletions .gitignore
@@ -0,0 +1,8 @@
.terraform/
*tfstate*
*.zip
*.retry
iofogctl_inventory.yaml
.idea/
my_credentials.env
my_vars.tfvars
18 changes: 0 additions & 18 deletions .travis.yml

This file was deleted.

52 changes: 52 additions & 0 deletions CONTRIBUTING
@@ -0,0 +1,52 @@
# Contributing to Eclipse platform

Thanks for your interest in this project.

## Project description

platform is a command line interface for spinning up, developing on and testing with a local ECN deployment to get familiar with our software.
It can be used to test functionality and interaction between ioFog components to prepare for production deployments.

* https://projects.eclipse.org/projects/iot.iofog

## Developer resources

Information regarding source code management, builds, coding standards, and
more.

* https://projects.eclipse.org/projects/iot.iofog/developer

The project maintains the following source code repositories

* https://github.com/eclipse-iofog
* http://git.eclipse.org/c/iofog/org.eclipse.iofog.git

This project uses Bugzilla to track ongoing development and issues.

* Search for issues: https://eclipse.org/bugs/buglist.cgi?product=IoFog
* Create a new report: https://eclipse.org/bugs/enter_bug.cgi?product=IoFog

Be sure to search for existing bugs before you create another one. Remember that
contributions are always welcome!

## Eclipse Contributor Agreement

Before your contribution can be accepted by the project team contributors must
electronically sign the Eclipse Contributor Agreement (ECA).

* http://www.eclipse.org/legal/ECA.php

Commits that are provided by non-committers must have a Signed-off-by field in
the footer indicating that the author is aware of the terms by which the
contribution has been provided to the project. The non-committer must
additionally have an Eclipse Foundation account and must have a signed Eclipse
Contributor Agreement (ECA) on file.

For more information, please see the Eclipse Committer Handbook:
https://www.eclipse.org/projects/handbook/#resources-commit

## Contact

Contact the project developers via the project's "dev" list.

* https://dev.eclipse.org/mailman/listinfo/iofog-dev
81 changes: 0 additions & 81 deletions Makefile

This file was deleted.

41 changes: 41 additions & 0 deletions NOTICE
@@ -0,0 +1,41 @@
# Notices for Eclipse ioFog

This content is produced and maintained by the Eclipse ioFog project.

* Project home: https://projects.eclipse.org/projects/iot.iofog

## Trademarks

Eclipse ioFog is a trademark of the Eclipse Foundation.

## Copyright

All content is the property of the respective authors or their employers. For
more information regarding authorship of content, please consult the listed
source code repository logs.

## Declared Project Licenses

This program and the accompanying materials are made available under the terms
of the Eclipse Public License v. 2.0 which is available at
http://www.eclipse.org/legal/epl-2.0.

SPDX-License-Identifier: EPL-2.0

## Source Code

The project maintains the following source code repositories:

* https://github.com/eclipse-iofog
* http://git.eclipse.org/c/iofog/org.eclipse.iofog.git

## Third-party Content

## Cryptography

Content may contain encryption software. The country in which you are currently
may have restrictions on the import, possession, and use, and/or re-export to
another country, of encryption software. BEFORE using any encryption software,
please check the country's laws, regulations and policies concerning the import,
possession, or use, and re-export of encryption software, to see if this is
permitted.
99 changes: 96 additions & 3 deletions README.md
@@ -1,5 +1,98 @@
# iofog-platform
# Eclipse ioFog Platform

This project pulls all ioFog packages for the purposes of testing and releasing.
The Eclipse ioFog Platform project provides a means by which to spin up and deploy an Eclipse ioFog stack running
in the Cloud. Currently, we demonstrate how to achieve this on GKE (Google Kubernetes Engine), although since we are using
[Terraform](https://www.terraform.io/) under the covers you can easily extend/contribute to support your preferred
cloud infrastructure provider.

![alt text](https://raw.githubusercontent.com/iofog/iofog-platform/master/docs/artefacts.png)
# Requirements

* [GCloud SDK](https://cloud.google.com/sdk/)
* [Terraform](https://www.terraform.io/) (v0.11.x)
* [kubectl](https://kubernetes.io/docs/reference/kubectl/overview/)
* [iofogctl](https://github.com/eclipse-iofog/iofogctl)

`./bootstrap.sh` will download those dependencies and initialise terraform variable file `./my_vars.tfvars`.

## Usage

Run `./bootstrap.sh` to ensure all required dependencies are present and initialise terraform variable file `./my_vars.tfvars`.

If you didn't have `gcloud` prior to running the bootstrap script:

* Authenticate with the gcloud sdk api, you will be prompted at the end of the bootstrap script.

* Please ensure `gcloud` is in your PATH.
You can do so by running:
```sh
source /usr/local/lib/google-cloud-sdk/completion.bash.inc
source /usr/local/lib/google-cloud-sdk/path.bash.inc
```

Edit the file `./my_vars.tfvars` according to the table below.

To deploy your ioFog stack, run `./deploy.sh`
To destroy your ioFog stack, run `./destroy.sh`

| Variables | Description |
| -----------------------|:------------------------------------------------------------:|
| `google_application_credentials` | *Path to [gcloud service account json key](https://cloud.google.com/iam/docs/creating-managing-service-account-keys)* |
| `project_id` | *id of your google platform project* |
| `environment` | *unique name for your environment* |
| `gcp_region` | *region to spin up the resources* |
| `controller_image` | *docker image link for controller setup* |
| `connector_image` | *docker image link for connector setup* |
| `scheduler_image` | *docker image link for scheduler setup* |
| `operator_image` | *docker image link for operator setup* |
| `kubelet_image` | *docker image link for kubelet setup* |
| `controller_ip` | *list of edge ips, comma separated to install agent on* |
| `iofogUser_name` | *name for registration with controller* |
| `iofogUser_surname` | *surname for registration with controller* |
| `iofogUser_email` | *email to use to register with controller* |
| `iofogUser_password` | *password(length >=8) for user registeration with controller*|
| `iofogctl_namespace` | *namespace to be used with iofogctl commands* |
| `agent_list` | *list of agents to be deployed* |

## Agent list
The variable `agent_list` contains a list of remote hardware on top of which you would like us to deploy an ioFog agent, connect it to the GKE hosted controller, and include it inside our Kubernetes network.
To do so we require the following information (per remote resource):
```
{
name = "<AGENT_NAME>", # Name used to register the agent with the controller
user = "<AGENT_USER>", # User name for ssh connection into the resource
host = "<AGENT_IP>", # host for ssh connection into the resource
port = "<SSH_PORT>", # port for ssh connection into the resource
keyfile = "<PRIVATE_SSH_KEY>" # Absolute path to the private key used to ssh into the resource
}
```

## Option to deploy agent nodes on [Packet](https://www.packet.com/)
On top of providing a list of existing resources in the `agent_list` variable, we support deployment of agent nodes on [packet](https://www.packet.com/) provided you have an account.
In situations where you do not have your own devices acting as edge nodes, you can sping a few nodes on packet to act as agents. You will need Packet token to setup packet provider on terraform. Also be aware of account limitation for example,unable to spin more than 2 arm nodes per project.
You will also need to make sure you have [uploaded an ssh key](https://support.packet.com/kb/articles/ssh-access) on your packet project that will be used by automation to add to newly created instances.

Warning: We will look for the `packet_auth_token` variable. If it is defined, we will try to spin up Packet nodes according to the other variables. If it is empty or commented, we will not load anything Packet related.

Additional variables:

| Variables | Description |
| -----------------------|:------------------------------------------------------------:|
| `packet_auth_token` | *packet [auth token](https://support.packet.com/kb/articles/api-integrations)* |
| `packet_project_id` | *packet project id to spin agents on packet* |
| `operating_system` | *operating system for edge nodes on packet* |
| `packet_facility` | *facilities to use to drop agents* |
| `count_x86` | *number of x86(make sure your project plan allow)* |
| `plan_x86` | *server plan for device on x86 available on facility chosen* |
| `count_arm` | *number of arm agents to spin up* |
| `plan_arm` | *server plan for device on arm available on facility chosen* |
| `ssh_key` | *path to ssh key to be used for accessing packet edge nodes* |

### Helpful Commands

- Login to gcloud: `gcloud auth login`

- Kubeconfig for gke cluster: `gcloud container clusters get-credentials <<CLUSTER_NAME>> --region <<REGION>>`

- Delete a particular terraform resource: `terraform destroy -target=null_resource.iofog -var-file=vars.tfvars -auto-approve`

- Terraform Output `terraform output ` or `terraform output -module=packet_edge_nodes`

0 comments on commit 2d1c48d

Please sign in to comment.