You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2021/09/08 20:22:22 UTC

[GitHub] [skywalking-python] Superskyyy opened a new pull request #159: Add dockerfile and image releasing scripts

Superskyyy opened a new pull request #159:
URL: https://github.com/apache/skywalking-python/pull/159


   This PR adds a Dockerfile and corresponding Makefile for building and releasing the Python agent images. 
   
   Also adds docs on how-to-release and how-to-use.
   
   
   Signed-off-by: Superskyyy <Su...@outlook.com>
   
   <!-- Uncomment the following checklist WHEN AND ONLY WHEN you're adding a new plugin -->
   <!--
   - [ ] Add a test case for the new plugin
   - [ ] Add a component id in [the main repo](https://github.com/apache/skywalking/blob/master/oap-server/server-bootstrap/src/main/resources/component-libraries.yml#L415)
   - [ ] Add a logo in [the UI repo](https://github.com/apache/skywalking-rocketbot-ui/tree/master/src/views/components/topology/assets)
   - [ ] Rebuild the `requirements.txt` by running `tools/env/build_requirements_(linux|windows).sh`
   -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking-python] wu-sheng commented on pull request #159: Add dockerfile and image releasing scripts

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on pull request #159:
URL: https://github.com/apache/skywalking-python/pull/159#issuecomment-915643433


   I recommend python repo begins to consider moving all document into website, as it begins larger and more official.
   Only need to organize the structure, and add menu.yaml. Please take main repo or java repo as an example.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking-python] Superskyyy commented on a change in pull request #159: Add dockerfile and image releasing scripts

Posted by GitBox <gi...@apache.org>.
Superskyyy commented on a change in pull request #159:
URL: https://github.com/apache/skywalking-python/pull/159#discussion_r704881007



##########
File path: docs/How-to-release-docker.md
##########
@@ -0,0 +1,59 @@
+# Apache SkyWalking Python Image Release Guide
+
+This documentation shows the way to build and push the SkyWalking Python images to DockerHub.
+
+## Prerequisites
+
+Before building the latest release of images, make sure an official release is pushed to PyPI where the dockerfile will depend on.
+
+# Images
+
+This process wil generate a list of images covering most used Python versions and variations(grpc/http/kafka) of the Python agent.
+
+The convenience images are published to Docker Hub and available from the `skywalking.docker.scarf.sh` endpoint.
+- `skywalking.docker.scarf.sh/apache/skywalking-python` ([Docker Hub](https://hub.docker.com/r/apache/skywalking-python))
+
+# How to build
+
+Issue the following commands to build relevant docker images for the Python agent.
+The `make` command will generate three images(grpc, http, kafka) for each Python version supported.
+
+At the root folder -
+```shell
+source docker/v/<version>.sh

Review comment:
       Yeah makes sense, no need for a file for just single line...

##########
File path: docker/README.md
##########
@@ -0,0 +1,53 @@
+# Apache SkyWalking Python Agent dockerfile and images
+
+**Docker images are not official ASF releases but provided for convenience. Recommended usage is always to build the
+source**
+
+**<img src="http://skywalking.apache.org/assets/logo.svg" alt="SkyWalking logo" height="90px" align="right" />**
+
+**SkyWalking**: an APM(application performance monitor) system, especially designed for microservices, cloud native and
+container-based (Docker, Kubernetes, Mesos) architectures.
+
+[![GitHub stars](https://img.shields.io/github/stars/apache/skywalking.svg?style=for-the-badge&label=Stars&logo=github)](https://github.com/apache/skywalking)
+[![Twitter Follow](https://img.shields.io/twitter/follow/asfskywalking.svg?style=for-the-badge&label=Follow&logo=twitter)](https://twitter.com/AsfSkyWalking)
+
+This image hosts the SkyWalking Python agent package on top of official Python base images providing support from 
+Python 3.5 - 3.9.
+
+## How to use this image
+
+The images are hosted at [Docker Hub](https://hub.docker.com/r/apache/skywalking-python) and available from the `skywalking.docker.scarf.sh` endpoint.
+
+`skywalking.docker.scarf.sh/apache/skywalking-python`
+
+### Build your Python application image on top of this image
+
+Start by pulling the skywalking-python image as the base of your application image.
+Refer to [Docker Hub](https://hub.docker.com/r/apache/skywalking-python) for the list of tags available.
+
+```dockerfile
+FROM apache/skywalking-python:0.7.0-grpc-py3.9
+
+# ... build your Python application
+```
+
+You could start your Python application with `CMD`. For example - `CMD ['gunicorn', 'app.wsgi']` 
+
+You don't need to care about enabling the SkyWalking Python agent manually, 
+it should be adopted and bootstrapped automatically through the `sw-python` CLI.
+
+[Environment variables](../docs/EnvVars.md) can be provided to customize the agent behavior.
+
+### Build an image from the dockerfile 
+
+Provide the following arguments to build your own image from the dockerfile.
+
+```text
+SW_PYTHON_VERSION # the Python base image version

Review comment:
       Ok




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking-python] kezhenxu94 commented on a change in pull request #159: Add dockerfile and image releasing scripts

Posted by GitBox <gi...@apache.org>.
kezhenxu94 commented on a change in pull request #159:
URL: https://github.com/apache/skywalking-python/pull/159#discussion_r704878599



##########
File path: docker/README.md
##########
@@ -0,0 +1,53 @@
+# Apache SkyWalking Python Agent dockerfile and images
+
+**Docker images are not official ASF releases but provided for convenience. Recommended usage is always to build the
+source**
+
+**<img src="http://skywalking.apache.org/assets/logo.svg" alt="SkyWalking logo" height="90px" align="right" />**
+
+**SkyWalking**: an APM(application performance monitor) system, especially designed for microservices, cloud native and
+container-based (Docker, Kubernetes, Mesos) architectures.
+
+[![GitHub stars](https://img.shields.io/github/stars/apache/skywalking.svg?style=for-the-badge&label=Stars&logo=github)](https://github.com/apache/skywalking)
+[![Twitter Follow](https://img.shields.io/twitter/follow/asfskywalking.svg?style=for-the-badge&label=Follow&logo=twitter)](https://twitter.com/AsfSkyWalking)
+
+This image hosts the SkyWalking Python agent package on top of official Python base images providing support from 
+Python 3.5 - 3.9.
+
+## How to use this image
+
+The images are hosted at [Docker Hub](https://hub.docker.com/r/apache/skywalking-python) and available from the `skywalking.docker.scarf.sh` endpoint.
+
+`skywalking.docker.scarf.sh/apache/skywalking-python`
+
+### Build your Python application image on top of this image
+
+Start by pulling the skywalking-python image as the base of your application image.
+Refer to [Docker Hub](https://hub.docker.com/r/apache/skywalking-python) for the list of tags available.
+
+```dockerfile
+FROM apache/skywalking-python:0.7.0-grpc-py3.9
+
+# ... build your Python application
+```
+
+You could start your Python application with `CMD`. For example - `CMD ['gunicorn', 'app.wsgi']` 
+
+You don't need to care about enabling the SkyWalking Python agent manually, 
+it should be adopted and bootstrapped automatically through the `sw-python` CLI.
+
+[Environment variables](../docs/EnvVars.md) can be provided to customize the agent behavior.
+
+### Build an image from the dockerfile 
+
+Provide the following arguments to build your own image from the dockerfile.
+
+```text
+SW_PYTHON_VERSION # the Python base image version

Review comment:
       Let's make the whole base image name as an `arg`, not just the python version, it's common that users want to build `FROM` their internal base image.

##########
File path: docs/How-to-release-docker.md
##########
@@ -0,0 +1,59 @@
+# Apache SkyWalking Python Image Release Guide
+
+This documentation shows the way to build and push the SkyWalking Python images to DockerHub.
+
+## Prerequisites
+
+Before building the latest release of images, make sure an official release is pushed to PyPI where the dockerfile will depend on.
+
+# Images
+
+This process wil generate a list of images covering most used Python versions and variations(grpc/http/kafka) of the Python agent.
+
+The convenience images are published to Docker Hub and available from the `skywalking.docker.scarf.sh` endpoint.
+- `skywalking.docker.scarf.sh/apache/skywalking-python` ([Docker Hub](https://hub.docker.com/r/apache/skywalking-python))
+
+# How to build
+
+Issue the following commands to build relevant docker images for the Python agent.
+The `make` command will generate three images(grpc, http, kafka) for each Python version supported.
+
+At the root folder -
+```shell
+source docker/v/<version>.sh

Review comment:
       I'd rather just move `export AGENT_VERSION=<version>` here




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking-python] wu-sheng edited a comment on pull request #159: Add dockerfile and image releasing scripts

Posted by GitBox <gi...@apache.org>.
wu-sheng edited a comment on pull request #159:
URL: https://github.com/apache/skywalking-python/pull/159#issuecomment-915643433


   I recommend python repo begins to consider moving all document into website, as it becomes larger and more official.
   Only need to organize the structure, and add menu.yaml. Please take main repo or java repo as an example.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking-python] kezhenxu94 merged pull request #159: Add dockerfile and image releasing scripts

Posted by GitBox <gi...@apache.org>.
kezhenxu94 merged pull request #159:
URL: https://github.com/apache/skywalking-python/pull/159


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking-python] Superskyyy commented on pull request #159: Add dockerfile and image releasing scripts

Posted by GitBox <gi...@apache.org>.
Superskyyy commented on pull request #159:
URL: https://github.com/apache/skywalking-python/pull/159#issuecomment-915659422


   > I recommend python repo begins to consider moving all document into website, as it becomes larger and more official.
   > Only need to organize the structure, and add menu.yaml. Please take main repo or java repo as an example.
   
   I can work on that tomorrow. 👨‍🍳


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org