Creating an auto deploy button for Schematics actions
Use the instructions to create a button that opens the Schematics actions create page and pre-populates an action name and the GitHub repository URL that stores your Ansible playbook. You can use the button to create Schematics actions more quickly.
For a sample button, see the Deploy to IBM Cloud®
button on the Sample Ansible playbook for IBM Cloud® page.
Creating the deployment URL
-
Create an Ansible playbook and publish the playbook in a GitHub repository. If you do not have a playbook, you can use one of the IBM-provided Ansible playbooks.
-
Copy the Git repository URL, such as
https://github.com/Cloud-Schematics/ansible-app-deploy
. -
Use the following syntax to create the URL to automatically pre-populate an action name and the Git repository URL on the Schematics actions create page. If you do not provide the name and Git repository URL, the
Deploy to IBM Cloud®
link defaults to the Create an action page without pre-populating an action name or the Git repository URL.Syntax
https://cloud.ibm.com/schematics/actions/create?name=<action_name>&repository=<git_repository_url>
Example
https://cloud.ibm.com/schematics/actions/create?name=ansible-app-deploy&repository=https://github.com/Cloud-Schematics/ansible-app-deploy
-
Open your web browser and enter the URL.
-
Verify that the Schematics actions create page opens and that the Action name and Repository URL are pre-populated.
Adding the button to a website or page
You can add an image to your URL to create your Deploy to IBM Cloud button.
Next steps
Explore the Schematics samples templates to deploy in your IBM Cloud account. Looking for more code examples? Check out the samples for IBM Cloud Schematics GitHub repositories.