-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 78dacde
Showing
36 changed files
with
7,543 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
pipeline { | ||
|
||
agent { | ||
node { | ||
label 'aws-ec2' | ||
} | ||
} | ||
|
||
triggers { | ||
gitlab(triggerOnPush: true, branchFilterType: 'All') | ||
} | ||
|
||
|
||
options { | ||
gitLabConnection('Intel-Gitlab') | ||
gitlabCommitStatus(name: 'jenkins') | ||
} | ||
|
||
|
||
stages { | ||
stage('Setup') { | ||
steps { | ||
sh ''' | ||
while pgrep apt > /dev/null; do | ||
sleep 10 | ||
done | ||
sudo apt-get update | ||
sudo apt-get install -y python3 python3-pip | ||
pip3 install setuptools | ||
''' | ||
} | ||
} | ||
stage('Build') { | ||
steps { | ||
sh ''' | ||
sudo python3 setup.py install | ||
sudo pip3 install pyinstaller | ||
sudo pip3 install defusedxml | ||
sudo pyinstaller edgesoftware.spec | ||
''' | ||
} | ||
} | ||
stage('Validate') { | ||
steps { | ||
sh ''' | ||
python3 test/functional/test.py | ||
python3 test/unit/test_utils.py | ||
''' | ||
} | ||
} | ||
} | ||
|
||
post { | ||
success { | ||
emailext( | ||
body: '$DEFAULT_CONTENT', | ||
replyTo: '$DEFAULT_REPLYTO', | ||
subject: '$DEFAULT_SUBJECT', | ||
to: '$gitlabUserEmail', | ||
) | ||
updateGitlabCommitStatus name: 'build', state: 'success' | ||
} | ||
failure { | ||
emailext( | ||
body: '$DEFAULT_CONTENT', | ||
replyTo: '$DEFAULT_REPLYTO', | ||
subject: '$DEFAULT_SUBJECT', | ||
to: '$gitlabUserEmail', | ||
) | ||
updateGitlabCommitStatus name: 'build', state: 'failed' | ||
} | ||
} | ||
} |
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,23 @@ | ||
Copyright May 2021 Intel Corporation | ||
|
||
This software and the related documents are Intel copyrighted materials, and your use of them is governed by the express license under which they were provided to you ("License"). Unless the License provides otherwise, you may not use, modify, copy, publish, distribute, disclose or transmit this software or the related documents without Intel's prior written permission. | ||
|
||
This software and the related documents are provided as is, with no express or implied warranties, other than those that are expressly stated in the License. | ||
|
||
|
||
Third party components and their licenses: | ||
|
||
python3-pip: https://pypi.org/project/pip/ | ||
PyYAML - https://github.com/yaml/pyyaml | ||
click - https://pypi.org/project/click/ | ||
wget - https://pypi.org/project/wget/ | ||
requests - https://pypi.org/project/requests/ | ||
termcolor - https://pypi.org/project/termcolor/ | ||
git - https://github.com/git/git | ||
curl - https://curl.haxx.se/, https://curl.haxx.se/docs/copyright.html | ||
Prettytable - https://pypi.org/project/PrettyTable/ | ||
psutil - https://pypi.org/project/psutil/ | ||
docker - https://pypi.org/project/docker/ | ||
colorama - https://pypi.org/project/colorama/ | ||
tqdm - https://pypi.org/project/tqdm/ | ||
|
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,172 @@ | ||
## Command Line Interface for Intel® Edgesoftware | ||
|
||
*edgesoftware* is a command line interface wrapper (CLI) that helps you manage [Intel® Edge Software Hub packages](https://software.intel.com/content/www/us/en/develop/topics/iot/edge-solutions.html). With these pretested and pre-validated packages you can create reliable, scalable AI applications for the edge. | ||
|
||
|
||
|
||
### Installation | ||
|
||
#### Requirements | ||
|
||
- Minimum Python* version: 3.6 | ||
|
||
- To install the software package, you will need an XML configuration file (*edgesoftware_configuration.xml*) along with the CLI. There is a dedicated XML configuration file for each software package (for example, Edge Insights for Vision) which you can find on [Intel® Edge Software Hub](https://www.intel.in/content/www/in/en/edge-computing/edge-software-hub.html). | ||
|
||
|
||
|
||
#### System Requirements | ||
|
||
The table below lists supported operating systems and Python versions required to run the installation. | ||
|
||
| Supported Operating System | [Python* Version (64-bit)](https://www.python.org/) | | ||
| :-------------------------------------------- | :-------------------------------------------------- | | ||
| Ubuntu* 18.04 long-term support (LTS), 64-bit | 3.6 | | ||
| Ubuntu* 20.04 long-term support (LTS), 64-bit | 3.8 | | ||
| Ubuntu* 22.04 long-term support (LTS), 64-bit | 3.10 | | ||
| Red Hat* Enterprise Linux* 8, 64-bit | 3.6 | | ||
| CentOS* 7, 64-bit | 3.6 | | ||
|
||
> **NOTE**: This package can be installed on other versions of Linux, but only the specific versions above are fully validated. | ||
|
||
|
||
#### Install edgesoftware CLI | ||
|
||
##### Step 1: Install and update PIP to the highest version | ||
|
||
To install pip in Ubuntu 18.04, Ubuntu 20.04 and Ubuntu 22.04 | ||
|
||
```shell | ||
sudo apt install python3-pip | ||
``` | ||
|
||
To install pip in CentOS 7 and RHEL 8: | ||
|
||
``` | ||
sudo yum install python3-pip | ||
``` | ||
|
||
Run the command below to upgrade pip to the latest version: | ||
|
||
``` | ||
python3 -m pip install --upgrade pip | ||
``` | ||
|
||
##### Step 2. Install the package | ||
|
||
Run the command below: | ||
|
||
```shell | ||
python3 -m pip install edgesoftware --user | ||
``` | ||
|
||
##### Step 3. If needed, launch a new terminal and verify that package is installed | ||
|
||
Run the command below: | ||
|
||
```shell | ||
edgesoftware -v | ||
``` | ||
|
||
You will not see any error messages if installation finished successfully. | ||
|
||
|
||
|
||
### Using the edgesoftware CLI | ||
|
||
**Learn all of the commands available with *edgesoftware* CLI** | ||
|
||
Run the command below: | ||
|
||
```shell | ||
edgesoftware | ||
``` | ||
|
||
**Response:** | ||
|
||
> Usage: edgesoftware [OPTIONS] COMMAND [ARGS]... | ||
> A CLI wrapper for management of Intel® Edge Software Hub packages. | ||
> **Options:** | ||
> | ||
> > | options | description | | ||
> > | ------------- | -------------------------- | | ||
> > | -v, --version | Show the version and exit. | | ||
> > | --help | Show this message and exit | | ||
> > | ||
> > | ||
> **Commands:** | ||
> | ||
> > | commands | description | | ||
> > | --------- | ------------------------------------------------------ | | ||
> > | docker | Pull docker images | | ||
> > | download | Download modules/artifacts of a package. | | ||
> > | export | Export modules installed as part of a package. | | ||
> > | helm | Download Helm charts or update Kubernetes secret keys. | | ||
> > | install | Install modules of a package. | | ||
> > | list | List the modules of a package. | | ||
> > | log | Show log of CLI events. | | ||
> > | uninstall | Uninstall the modules of a package. | | ||
> > | update | Update the modules of a package. | | ||
> > | upgrade | Upgrade a package. | | ||
|
||
|
||
#### Learn more about a command | ||
|
||
Run the command below: | ||
|
||
```shell | ||
edgesoftware <command> --help | ||
``` | ||
|
||
Example: | ||
|
||
```shell | ||
edgesoftware list --help | ||
``` | ||
|
||
Response: | ||
|
||
> Usage: edgesoftware list [OPTIONS] | ||
> List the modules of a package. | ||
> Options: | ||
> > | options | description | | ||
> > | ------------- | -------------------------------------- | | ||
> > | -v, --version | Lists available packages. | | ||
> > | -j, --json | Return output in json format. | | ||
> > | -d, --default | Lists the default modules of a package | | ||
> > | --help | Show this message and exit | | ||
|
||
|
||
### Troubleshooting | ||
|
||
**Error: *edgesoftware* command may not respond after installation.** | ||
|
||
To mitigate this issue, close the current terminal and open a new terminal. The command should work in the newer terminal. | ||
|
||
**Error: *python3 -m pip install edgesoftware* may fail due to failed installation of cryptography package.** | ||
|
||
To resolve this issue, upgrade pip to latest version using *python3 -m pip install --upgrade pip* and then retry the installation. | ||
|
||
**Error: *edgesoftware install* command may fail first time giving error - missing esb_common.** | ||
|
||
To resolve this issue, try edgesoftware install command once again. This time you should be able to install the modules. | ||
|
||
|
||
|
||
### Additional Resources | ||
|
||
Refer to [Introduction to the Edge Software Hub CLI](https://www.intel.com/content/www/us/en/develop/documentation/edge-insights-vision-doc/get-started-guide-using-linux/intro-to-the-edge-software-cli.html) for more information on CLI commands. | ||
|
||
|
||
|
||
### License | ||
|
||
All *edgesoftware* wheels on PyPI are distributed under [LIMITED TOOLS LICENSE AGREEMENT](https://software.intel.com/content/dam/develop/external/us/en/documents/limited-tools-license-agreement.pdf). |
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,81 @@ | ||
================================================================== | ||
Edge Software Builder: Command Line Interface for Package Building | ||
================================================================== | ||
|
||
This is a client library for installing modules in a package. | ||
It provides a command-line tool (edgesoftware). | ||
|
||
Installation Steps | ||
------------------ | ||
edgesoftware CLI can be installed from sources. This is a preferred and quicker way for Developers. | ||
|
||
************ | ||
For Linux: | ||
************ | ||
|
||
|
||
One time setup only: | ||
^^^^^^^^^^^^^^^^^^^^ | ||
|
||
$ *sudo apt-get update && sudo apt install python3-pip -y* (On Ubuntu/Debian based systems) | ||
|
||
$ *sudo yum update -y && sudo yum install gcc python3-devel python3-pip -y* (On CentOS/RHEL based systems) | ||
|
||
$ *pip3 install --upgrade pip* | ||
|
||
$ *pip3 install -r requirements.txt* | ||
|
||
**Generate the Binary:** | ||
|
||
$ *sudo python3 setup.py install* | ||
|
||
************ | ||
For Windows: | ||
************ | ||
|
||
One time setup only | ||
^^^^^^^^^^^^^^^^^^^ | ||
|
||
$ *pip install --upgrade pip* | ||
|
||
$ *pip install -r requirements.txt* | ||
|
||
**Generate the Binary:** | ||
|
||
$ *python setup.py install* | ||
|
||
|
||
Generate Python Executable | ||
-------------------------- | ||
|
||
**Preferred way for Validation and E2E testing::** | ||
|
||
To generate ``edgesoftware`` executable for **Linux** based systems:: | ||
|
||
$ git clone --single-branch https://gitlab.devtools.intel.com/software_recipe/software_recipe_components/common | ||
$ cd common | ||
$ python3 build_common.py | ||
$ cd - | ||
$ sudo python3 setup.py install && sudo rm -rf build/ dist/ edgesoftware.egg-info | ||
$ pyinstaller edgesoftware.spec | ||
|
||
The executable will be available at ``dist/edgesoftware``. | ||
|
||
Usage | ||
----- | ||
|
||
Use the ``edgesoftware`` command to download, install, list, log, pull, update and upgrade | ||
packages/modules in a recipe. For help run:: | ||
|
||
$ edgesoftware --help | ||
|
||
For example:: | ||
|
||
$ edgesoftware install | ||
|
||
Running Tests | ||
------------- | ||
|
||
To run tests:: | ||
|
||
$ python3 test/functional/test.py |
Empty file.
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,5 @@ | ||
[default] | ||
service_layer_url = http://mc-qa-service-layer.apps1-ir-int.icloud.intel.com/ | ||
#service_layer_url = http://mcdevservicelayeresb.apps1-ir-int.icloud.intel.com/ | ||
#service_layer_url = https://eshqaservicelayer.intel.com/ | ||
esh_cli_dev = 250cb3ee-d37a-409e-abae-3991c78904f9 |
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,2 @@ | ||
sphinx!=1.6.6,!=1.6.7,!=2.1.0,>=1.6.2;python_version>='3.4' # BSD | ||
reno>=2.5.0 # Apache-2.0 |
Oops, something went wrong.