Not a customer? Click the 'Start a free trial' link to begin a 30-day SaaS trial of our product and to join our community.
Existing Cisco AppDynamics customers should click the 'Sign In' button to authenticate to access the community
on 10-08-2024 09:50 AM
If you're working with Cisco AppDynamics Smart Agent and need a simple way to host your installation files, Python offers a built-in HTTP server to get you up and running in minutes. This lightweight web server is ideal for quickly sharing files within your network without the hassle of configuring a full-blown web server like Apache or Nginx. In this guide, we'll walk through the steps to set up a web server using Python 3.11 to host your Smart Agent installation files.
The http.server module in Python allows you to serve files over HTTP directly from your file system. It's a great tool for:
Python 3.11: Ensure that you have Python 3.11 installed on your system. You can check by running:
bash
python3.11 --version
If you don't have Python 3.11 installed, you can download it from the official Python website.
Cisco AppDynamics Smart Agent installation files: These files should be available in the directory you plan to host. Typically, these will be .deb or .rpm files such as appdsmartagent_<architecture>_<platform>_<version>.deb or appdsmartagent_<architecture>_<platform>_<version>.rpm.
First, create a directory on your system to store the Smart Agent installation files. For this guide, let's assume you create a directory named appd-agent-files.
bash
mkdir ~/appd-agent-files
Next, move the installation files into this directory. These could be .deb or .rpm files depending on your deployment platform.
bash
mv appdsmartagent_* ~/appd-agent-files
Navigate to the directory where your installation files are located and run the following command to start the Python HTTP server on port 8000:
bash
cd ~/appd-agent-files
python3.11 -m http.server 8000
This will start an HTTP server that serves the files in the current directory at http://<your-server-ip>:8000. Replace <your-server-ip> with the actual IP address or hostname of the machine running the server.
Once the server is running, you can access the hosted files by opening a web browser or using a tool like curl or wget to download the files.
For example, to download a file named appdsmartagent_x86_64_debian_21.10.deb, you can run:
bash
wget http://<your-server-ip>:8000/appdsmartagent_x86_64_debian_21.10.deb
Python’s HTTP server is easy to set up but lacks advanced security features like SSL/TLS, user authentication, or access controls. It is best suited for internal or development environments. For production deployments, consider more secure options such as Nginx or Apache. Additionally, always be mindful of your organization's security policy and posture to ensure that using a lightweight solution like this aligns with internal security guidelines.
While the Python HTTP server is lightweight and intended for short-term use, it works well in the following scenarios:
Local Development and Testing: Ideal for quickly sharing files or testing deployments in isolated, controlled environments, such as hosting Cisco AppDynamics Smart Agent files on a local machine or test server.
Short-Term File Sharing: Suitable for temporary hosting during specific tasks like setup or testing. Simply stop the server with Ctrl + C when done.
Internal Networks: Safe to use within secure internal networks where access is restricted and traffic is monitored by tools like Cisco’s ThousandEyes or AppDynamics.
Thank you! Your submission has been received!
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form