Hosting a private python package manager in Azure or AWS

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Hosting a private python package manager in Azure or AWS

L0 Member

I work in a small team of Python developers and our aim is to create a private package manager to store our packages. I came cross pypicloud and following its tutorial I've successfully been able to upload and install packages stored in AWS-S3. That's fantastic.

However, the private package manager is launched and hosted locally typing pserve server.iniin the terminal. The package manager is then accessible at http:/ /0.0.0.0:6543/#/. Ideally, I want this server to be:

  1. hosted in the cloud (possibly Azure but AWS is fine)
  2. up and running 24/7
  3. secure. Users must authenticate in order to see the package manager and the packages.
  4. not hosted in a operative system but something higher level (e.g. docker container or Azure function app?) since it would be much easier to maintain, geo-replicate etc

How to get a secure and private server (python package manager) always up and running in the cloud?

3 REPLIES 3

L0 Member

This is roughly just a simple way to deploy a container without the burden of Kubernetes. ACS might be best if you really want a dedicated container solution (there is several orchestrators).

For the authentication part, htaccess file with basic authentication is supported by pip. This allow to do something like extra-index-url = https://login:password@pypi.myserver.com/simple/. I don't have a prefered tutorial, but google/bing something like "pip private repository" you will have no issue to find answers.

(full disclosure, I work at MS in the Azure Python SDK team)

L0 Member

It is not working for me.

L1 Bithead

Hello

you can follow below steps-

  1. Choose a cloud provider: Select a cloud provider such as Azure or AWS, based on your preference and requirements.

  2. Set up a virtual machine or container: Create a virtual machine or container instance in the cloud environment. You can use Azure Virtual Machines or AWS EC2 for this purpose.

  3. Install and configure the necessary dependencies: Install Python, pypicloud, and any other dependencies required for your package manager on the virtual machine or container.

  4. Secure the server: Configure firewall rules and network security groups to restrict access to the server. Ensure that only authorized users can connect to the server.

  5. Set up HTTPS: Obtain an SSL certificate and configure HTTPS for secure communication with the server. This will ensure that data transferred between clients and the package manager is encrypted.

  6. Implement authentication: Configure authentication mechanisms, such as username/password or API keys, to restrict access to the package manager. This can be done using frameworks like Flask or Django.

  7. Containerize the application (optional): If you prefer a containerized solution, you can create a Docker image containing your package manager and deploy it to a container service like Azure Container Instances or AWS Elastic Container Service.

  8. Deploy and monitor: Deploy your package manager to the cloud server and set up monitoring to ensure it is always up and running. Configure auto-scaling and load balancing if needed.

Hope it helps you. 

Thank you .

  • 2898 Views
  • 3 replies
  • 1 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!