Skip to content

Simple solution to run commands through event driven cloud solutions: Google Cloud PubSub, Azure Service Bus..

Notifications You must be signed in to change notification settings

rawlukMike/Cloud-Tasker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cloud-Tasker

Simple solution to run commands through event driven cloud solutions. Currently support GCP PubSub Only

Use Case:

For situaction where there is no ssh connection to machine, but some maintaince could be useful. As long as machine has access to pubsub scope, it can be maintained this way. It's also an alternative to startup script, since It can be runned as any user and does not require restart per change.

Requirements :

python3 -m pip install --upgrade google-cloud-pubsub pyfiglet

Usage Client:

python3 client.py -n servername -t projects/sample-project/topics/yourtopic -s projects/sample-project/subscriptions/yourtopicservernameresult

Usage Server:

Whitelist

You can pass json file in format: { "whitelist" : [ "sample-cmd1", "cmd2" ] }

as config param -c. Server will only run cmd same as whitelist. This is optional parameter. Server will allow every other cmd otherwise.

Running

Server will create subscription and list you name (yourtopic-servername-result).

python3 server.py -n servername -t projects/sample-project/topics/yourtopic -c whitelist.json

Screenshot:

Server:

image

Client:

image

About

Simple solution to run commands through event driven cloud solutions: Google Cloud PubSub, Azure Service Bus..

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published