Background The current development environment of Apache APISIX is relatively complex to build, and various dependency packages need to be installed. If developers want to run APISIX test cases locally, it will make the development environment more responsible for changes. Even for developers familiar with APISIX, building a development environment may take several hours.
Therefore, more and more developers hope that the Apache APISIX community can provide a standardized development environment to reduce the difficulty of building a development environment for developers, thereby improving development and testing efficiency. 1. The benefits of solving this problem 1.1 It allows developers to start an APISIX development environment in a few minutes. 1.2 Developers are free to choose their favorite IDE. 1.3 Available on all platforms. 2. Solution 2.1. Provide the Dockerfile for building the development environment image in the APISIX project root directory. 2.2. Encapsulate the commands required at runtime into the Makefile. 2.3. The user starts the development environment according to the example, and runs the test case. 2.2. Encapsulate the commands required at runtime into the Makefile. 2.3. The user starts the development environment according to the example, and runs the test case. 3. Examples are as follows Developers only need to execute the following commands to create a development environment and run test cases. # Download APISIX and enter the APISIX directory $ sudo git clone https://github.com/apache/apisix.git $ cd apisix # Download dependent subprojects $ sudo git submodule update --init --recursive # Build the APISIX development environment's Docker image $ make build-dev # Start the APISIX development environment (start etcd and apisix-dev) $ make run-dev # Run the test case $ make test-dev files=t/admin/routes.t # Stop the development environment $ make stop-dev