diff options
| author | CoprDistGit <infra@openeuler.org> | 2023-04-12 04:56:24 +0000 |
|---|---|---|
| committer | CoprDistGit <infra@openeuler.org> | 2023-04-12 04:56:24 +0000 |
| commit | 3ebd8014124c79f303457c1fd124b98bd22c15ad (patch) | |
| tree | 917ec1e1bee2b7f583f7437f7c297e1859412bf5 /python-iotedgehubdev.spec | |
| parent | b9a70495a569673a862bd0547296912a588718f2 (diff) | |
automatic import of python-iotedgehubdev
Diffstat (limited to 'python-iotedgehubdev.spec')
| -rw-r--r-- | python-iotedgehubdev.spec | 426 |
1 files changed, 426 insertions, 0 deletions
diff --git a/python-iotedgehubdev.spec b/python-iotedgehubdev.spec new file mode 100644 index 0000000..27459f6 --- /dev/null +++ b/python-iotedgehubdev.spec @@ -0,0 +1,426 @@ +%global _empty_manifest_terminate_build 0 +Name: python-iotedgehubdev +Version: 0.14.18 +Release: 1 +Summary: Azure IoT EdgeHub Dev Tool +License: MIT +URL: https://github.com/Azure/iotedgehubdev +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/4c/e7/927cad69d4534a12495b8a2731b648854828b5c4df3b5c10365ae42a17fe/iotedgehubdev-v0.14.18-win32-ia32.zip +BuildArch: noarch + +Requires: python3-click +Requires: python3-docker +Requires: python3-pyOpenSSL +Requires: python3-requests +Requires: python3-applicationinsights +Requires: python3-pyyaml +Requires: python3-jsonpath-rw +Requires: python3-docker-compose +Requires: python3-regex + +%description + +# Azure IoT EdgeHub Dev Tool [](https://dev.azure.com/mseng/VSIoT/_build/latest?definitionId=7735&branchName=main) + +## Announcement +The Azure IoT EdgeHub Dev Tool is in a maintenance mode. Please see [this announcement](https://github.com/Azure/iotedgehubdev/issues/396) for more details. We recommend using VM, Physical devices or [EFLOW](https://github.com/Azure/iotedge-eflow). + +## Introduction +The Azure IoT EdgeHub Dev Tool provides a local development experience with a simulator for creating, developing, testing, running, and debugging Azure IoT Edge modules and solutions. + +The simulator allows you to run, test and debug your own custom IoT Edge modules locally, without the IoT Edge Runtime, and with the following benefits: +- Your custom Edge module code is the **same** whether running on the simulator or the full IoT Edge Runtime. +- Your Edge solution can be run locally **without the need** to push new images or create IoT Edge deployment manifests. +- The only credential required to run your Edge solution on the simulator is the **IoT Edge Device Connection String**. The IoT Hub Connection String is not needed. +- It helps you debug your custom Edge modules on the host and not just in the container. + +The following table compares the requirements to run your solution on the IoT Edge Runtime and iotedgehubdev tool: + + | | IoT Edge Runtime | iotedgehubdev | + | ----------------------------- |:----------------:|:-------------:| + | Device Credential Needed | YES | YES | + | IoT Hub Credential Needed | YES | **NO** | + | Build Image | YES | YES | + | Push Image | YES | **NO** | + | Create Deployment | YES | **NO** | + | Support native debug scenario | NO | **YES** | + +## Installing +1. Install [Docker CE (18.02.0+)](https://www.docker.com/community-edition) on +[Windows](https://docs.docker.com/docker-for-windows/install/), [macOS](https://docs.docker.com/docker-for-mac/install/) or [Linux](https://docs.docker.com/install/linux/docker-ce/ubuntu/#install-docker-ce) + +2. Install [Docker Compose (1.20.0+)](https://docs.docker.com/compose/install/#install-compose) (***Linux only***. *Compose has already been included in Windows/macOS Docker CE installation*) +3. Install [Python (3.5/3.6/3.7/3.8/3.9) and Pip](https://www.python.org/) +4. Install **iotedgehubdev** by running the following command in your terminal: + ``` + pip install --upgrade iotedgehubdev + ``` +5. Ensure the user is a member of **docker** user group (**Linux / MacOS only**): + ``` + sudo usermod -aG docker $USER + ``` + +**Please make sure there is no Azure IoT Edge runtime running on the same machine as iotedgehubdev since they require the same ports.** + +## Quickstart +### 1. Setup + + ``` + iotedgehubdev setup -c "<edge-device-connection-string>" + ``` + +### 2. Start/Stop an IoT Edge solution in simulator + + ``` + iotedgehubdev start -d <path/to/deployment-manifest> + iotedgehubdev stop + ``` + +### 3. Start and debug a single module natively + + 1. Start the module with specific input(s) and/or environment variable(s) + + ``` + iotedgehubdev start -i "<module-inputs>" + + // OR + + iotedgehubdev start -i "<module-inputs>" -e "<environment-variable>" + ``` + + **For example**: + `iotedgehubdev start -i "input1,input2" -e "TestEnv1=Value1" -e "TestEnv2=Value2"` + + 2. Output the module credential environment variables + + ``` + iotedgehubdev modulecred + ``` + + 3. Start your module natively with the environment variables from the previous step + + 4. Send a message to your module through the RESTful API + + **For example**: + `curl --header "Content-Type: application/json" --request POST --data '{"inputName": "input1","data": "hello world"}' http://localhost:53000/api/v1/messages` + + 5. Stop the simulator + + ``` + iotedgehubdev stop + ``` + +## Other resources +- [Azure IoT Edge for Visual Studio Code](https://github.com/microsoft/vscode-azure-iot-edge) +- [Azure IoT Edge Dev CLI Tool](https://github.com/azure/iotedgedev) + +# Data/Telemetry +This project collects usage data and sends it to Microsoft to help improve our products and services. Read our [privacy statement](http://go.microsoft.com/fwlink/?LinkId=521839) to learn more. +If you don’t wish to send usage data to Microsoft, you can change your telemetry settings by updating `collect_telemetry` to `no` in the ini file. + +# Contributing + +This project welcomes contributions and suggestions. 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 CLA-bot will automatically 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. + +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. + + + + +%package -n python3-iotedgehubdev +Summary: Azure IoT EdgeHub Dev Tool +Provides: python-iotedgehubdev +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-iotedgehubdev + +# Azure IoT EdgeHub Dev Tool [](https://dev.azure.com/mseng/VSIoT/_build/latest?definitionId=7735&branchName=main) + +## Announcement +The Azure IoT EdgeHub Dev Tool is in a maintenance mode. Please see [this announcement](https://github.com/Azure/iotedgehubdev/issues/396) for more details. We recommend using VM, Physical devices or [EFLOW](https://github.com/Azure/iotedge-eflow). + +## Introduction +The Azure IoT EdgeHub Dev Tool provides a local development experience with a simulator for creating, developing, testing, running, and debugging Azure IoT Edge modules and solutions. + +The simulator allows you to run, test and debug your own custom IoT Edge modules locally, without the IoT Edge Runtime, and with the following benefits: +- Your custom Edge module code is the **same** whether running on the simulator or the full IoT Edge Runtime. +- Your Edge solution can be run locally **without the need** to push new images or create IoT Edge deployment manifests. +- The only credential required to run your Edge solution on the simulator is the **IoT Edge Device Connection String**. The IoT Hub Connection String is not needed. +- It helps you debug your custom Edge modules on the host and not just in the container. + +The following table compares the requirements to run your solution on the IoT Edge Runtime and iotedgehubdev tool: + + | | IoT Edge Runtime | iotedgehubdev | + | ----------------------------- |:----------------:|:-------------:| + | Device Credential Needed | YES | YES | + | IoT Hub Credential Needed | YES | **NO** | + | Build Image | YES | YES | + | Push Image | YES | **NO** | + | Create Deployment | YES | **NO** | + | Support native debug scenario | NO | **YES** | + +## Installing +1. Install [Docker CE (18.02.0+)](https://www.docker.com/community-edition) on +[Windows](https://docs.docker.com/docker-for-windows/install/), [macOS](https://docs.docker.com/docker-for-mac/install/) or [Linux](https://docs.docker.com/install/linux/docker-ce/ubuntu/#install-docker-ce) + +2. Install [Docker Compose (1.20.0+)](https://docs.docker.com/compose/install/#install-compose) (***Linux only***. *Compose has already been included in Windows/macOS Docker CE installation*) +3. Install [Python (3.5/3.6/3.7/3.8/3.9) and Pip](https://www.python.org/) +4. Install **iotedgehubdev** by running the following command in your terminal: + ``` + pip install --upgrade iotedgehubdev + ``` +5. Ensure the user is a member of **docker** user group (**Linux / MacOS only**): + ``` + sudo usermod -aG docker $USER + ``` + +**Please make sure there is no Azure IoT Edge runtime running on the same machine as iotedgehubdev since they require the same ports.** + +## Quickstart +### 1. Setup + + ``` + iotedgehubdev setup -c "<edge-device-connection-string>" + ``` + +### 2. Start/Stop an IoT Edge solution in simulator + + ``` + iotedgehubdev start -d <path/to/deployment-manifest> + iotedgehubdev stop + ``` + +### 3. Start and debug a single module natively + + 1. Start the module with specific input(s) and/or environment variable(s) + + ``` + iotedgehubdev start -i "<module-inputs>" + + // OR + + iotedgehubdev start -i "<module-inputs>" -e "<environment-variable>" + ``` + + **For example**: + `iotedgehubdev start -i "input1,input2" -e "TestEnv1=Value1" -e "TestEnv2=Value2"` + + 2. Output the module credential environment variables + + ``` + iotedgehubdev modulecred + ``` + + 3. Start your module natively with the environment variables from the previous step + + 4. Send a message to your module through the RESTful API + + **For example**: + `curl --header "Content-Type: application/json" --request POST --data '{"inputName": "input1","data": "hello world"}' http://localhost:53000/api/v1/messages` + + 5. Stop the simulator + + ``` + iotedgehubdev stop + ``` + +## Other resources +- [Azure IoT Edge for Visual Studio Code](https://github.com/microsoft/vscode-azure-iot-edge) +- [Azure IoT Edge Dev CLI Tool](https://github.com/azure/iotedgedev) + +# Data/Telemetry +This project collects usage data and sends it to Microsoft to help improve our products and services. Read our [privacy statement](http://go.microsoft.com/fwlink/?LinkId=521839) to learn more. +If you don’t wish to send usage data to Microsoft, you can change your telemetry settings by updating `collect_telemetry` to `no` in the ini file. + +# Contributing + +This project welcomes contributions and suggestions. 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 CLA-bot will automatically 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. + +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. + + + + +%package help +Summary: Development documents and examples for iotedgehubdev +Provides: python3-iotedgehubdev-doc +%description help + +# Azure IoT EdgeHub Dev Tool [](https://dev.azure.com/mseng/VSIoT/_build/latest?definitionId=7735&branchName=main) + +## Announcement +The Azure IoT EdgeHub Dev Tool is in a maintenance mode. Please see [this announcement](https://github.com/Azure/iotedgehubdev/issues/396) for more details. We recommend using VM, Physical devices or [EFLOW](https://github.com/Azure/iotedge-eflow). + +## Introduction +The Azure IoT EdgeHub Dev Tool provides a local development experience with a simulator for creating, developing, testing, running, and debugging Azure IoT Edge modules and solutions. + +The simulator allows you to run, test and debug your own custom IoT Edge modules locally, without the IoT Edge Runtime, and with the following benefits: +- Your custom Edge module code is the **same** whether running on the simulator or the full IoT Edge Runtime. +- Your Edge solution can be run locally **without the need** to push new images or create IoT Edge deployment manifests. +- The only credential required to run your Edge solution on the simulator is the **IoT Edge Device Connection String**. The IoT Hub Connection String is not needed. +- It helps you debug your custom Edge modules on the host and not just in the container. + +The following table compares the requirements to run your solution on the IoT Edge Runtime and iotedgehubdev tool: + + | | IoT Edge Runtime | iotedgehubdev | + | ----------------------------- |:----------------:|:-------------:| + | Device Credential Needed | YES | YES | + | IoT Hub Credential Needed | YES | **NO** | + | Build Image | YES | YES | + | Push Image | YES | **NO** | + | Create Deployment | YES | **NO** | + | Support native debug scenario | NO | **YES** | + +## Installing +1. Install [Docker CE (18.02.0+)](https://www.docker.com/community-edition) on +[Windows](https://docs.docker.com/docker-for-windows/install/), [macOS](https://docs.docker.com/docker-for-mac/install/) or [Linux](https://docs.docker.com/install/linux/docker-ce/ubuntu/#install-docker-ce) + +2. Install [Docker Compose (1.20.0+)](https://docs.docker.com/compose/install/#install-compose) (***Linux only***. *Compose has already been included in Windows/macOS Docker CE installation*) +3. Install [Python (3.5/3.6/3.7/3.8/3.9) and Pip](https://www.python.org/) +4. Install **iotedgehubdev** by running the following command in your terminal: + ``` + pip install --upgrade iotedgehubdev + ``` +5. Ensure the user is a member of **docker** user group (**Linux / MacOS only**): + ``` + sudo usermod -aG docker $USER + ``` + +**Please make sure there is no Azure IoT Edge runtime running on the same machine as iotedgehubdev since they require the same ports.** + +## Quickstart +### 1. Setup + + ``` + iotedgehubdev setup -c "<edge-device-connection-string>" + ``` + +### 2. Start/Stop an IoT Edge solution in simulator + + ``` + iotedgehubdev start -d <path/to/deployment-manifest> + iotedgehubdev stop + ``` + +### 3. Start and debug a single module natively + + 1. Start the module with specific input(s) and/or environment variable(s) + + ``` + iotedgehubdev start -i "<module-inputs>" + + // OR + + iotedgehubdev start -i "<module-inputs>" -e "<environment-variable>" + ``` + + **For example**: + `iotedgehubdev start -i "input1,input2" -e "TestEnv1=Value1" -e "TestEnv2=Value2"` + + 2. Output the module credential environment variables + + ``` + iotedgehubdev modulecred + ``` + + 3. Start your module natively with the environment variables from the previous step + + 4. Send a message to your module through the RESTful API + + **For example**: + `curl --header "Content-Type: application/json" --request POST --data '{"inputName": "input1","data": "hello world"}' http://localhost:53000/api/v1/messages` + + 5. Stop the simulator + + ``` + iotedgehubdev stop + ``` + +## Other resources +- [Azure IoT Edge for Visual Studio Code](https://github.com/microsoft/vscode-azure-iot-edge) +- [Azure IoT Edge Dev CLI Tool](https://github.com/azure/iotedgedev) + +# Data/Telemetry +This project collects usage data and sends it to Microsoft to help improve our products and services. Read our [privacy statement](http://go.microsoft.com/fwlink/?LinkId=521839) to learn more. +If you don’t wish to send usage data to Microsoft, you can change your telemetry settings by updating `collect_telemetry` to `no` in the ini file. + +# Contributing + +This project welcomes contributions and suggestions. 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 CLA-bot will automatically 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. + +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. + + + + +%prep +%autosetup -n iotedgehubdev-0.14.18 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-iotedgehubdev -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Wed Apr 12 2023 Python_Bot <Python_Bot@openeuler.org> - 0.14.18-1 +- Package Spec generated |
