Skip to content

Commit

Permalink
Merge pull request #262 from TykTechnologies/remove-native-python-plu…
Browse files Browse the repository at this point in the history
…gins

Remove native python plugins
  • Loading branch information
davegarvey authored Jun 14, 2024
2 parents 81ae63c + a5483f9 commit a8b8a2a
Show file tree
Hide file tree
Showing 10 changed files with 1 addition and 660 deletions.
5 changes: 0 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ logs/*
**/*.so
deployments/cicd/volumes/jenkins/bootstrap-import/credentials-global.xml
deployments/cicd/volumes/jenkins/plugins/*.jpi
deployments/tyk/volumes/tyk-gateway/middleware/python/basic-example/bundle.zip
deployments/tyk/volumes/tyk-gateway/plugins/go/example/vendor
deployments/tyk/volumes/http-server/python-basic-example.zip
deployments/tyk/volumes/tyk-gateway/middleware/bundles
deployments/tyk/volumes/tyk-gateway/plugins/go/jwt/vendor
deployments/tyk/volumes/tyk-dashboard/audit/audit.log
Expand All @@ -20,8 +18,5 @@ deployments/tyk/volumes/tyk-gateway/certs/private-key.pem
deployments/tyk/volumes/tyk-gateway/certs/public-key.pem
deployments/tyk/volumes/tyk-dashboard/certs/private-key.pem

# ignore files whose names end with -vcsignore
*-vcsignore.*

## Portal Deployment
deployments/portal/volumes/database/portal.db
59 changes: 0 additions & 59 deletions deployments/tyk/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -133,39 +133,6 @@ bootstrap_progress
log_message "Wait for services to be available after restart"
wait_for_liveness

# Python plugin

#### Python plugin build temporarily removed due to Python not being bundled with v5.3 gateway release.
#### This will be reinstated once there is an established process.

# log_message "Building Python plugin bundle"
# docker exec -d $(get_service_container_id tyk-gateway) sh -c "cd /opt/tyk-gateway/middleware/python/basic-example; /opt/tyk-gateway/tyk bundle build -k /opt/tyk-gateway/certs/private-key.pem" 1> /dev/null 2>> logs/bootstrap.log
# if [ "$?" != 0 ]; then
# echo "Error occurred when building Python plugin bundle"
# exit 1
# fi
# log_ok
# bootstrap_progress

# log_message "Copying Python bundle to http-server"
# # we don't use a 'docker compose' command here as docker compose version 1 does not support 'cp'
# docker cp $(get_service_container_id tyk-gateway):/opt/tyk-gateway/middleware/python/basic-example/bundle.zip deployments/tyk/volumes/http-server/python-basic-example.zip 2>> logs/bootstrap.log
# if [ "$?" != 0 ]; then
# echo "Error occurred when copying Python bundle to http-server"
# exit 1
# fi
# log_ok
# bootstrap_progress

# log_message "Removing Python bundle intermediate assets"
# rm -r deployments/tyk/volumes/tyk-gateway/middleware/python/basic-example/bundle.zip
# if [ "$?" != 0 ]; then
# echo "Error occurred when removing Python bundle intermediate assets"
# exit 1
# fi
# log_ok
# bootstrap_progress

# Go plugins

build_go_plugin "example-go-plugin.so" "example"
Expand Down Expand Up @@ -459,32 +426,6 @@ do
done
log_ok

#### Python check temporarily removed due to Python not being bundled with v5.3 gateway release.
#### This will be reinstated once there is an established process.

# log_message "Checking Gateway - Python middleware"
# result=""
# reload_attempt=0
# while [ "$result" != "0" ]
# do
# wait_for_response "$gateway_base_url/python-middleware-api/get" "200" "" 3
# result="$?"
# if [ "$result" != "0" ]
# then
# reload_attempt=$((reload_attempt+1))
# if [ "$reload_attempt" -lt "3" ]; then
# log_message " Gateway not returning desired response, attempting hot reload"
# hot_reload "$gateway_base_url" "$gateway_api_credentials"
# sleep 2
# else
# log_message " Maximum reload attempt reached"
# exit 1
# fi
# fi
# bootstrap_progress
# done
# log_ok

log_message "Checking Gateway - Go plugin"
result=""
reload_attempt=0
Expand Down
Loading

0 comments on commit a8b8a2a

Please sign in to comment.