copyright | lastupdated | keywords | subcollection | ||
---|---|---|---|---|---|
|
2024-08-29 |
schematics action deployment, automation, schematics workspace, schematics workspace creation, auto deploy |
schematics |
{{site.data.keyword.attribute-definition-list}}
{: #auto-deploy-url}
Use the instructions to create a button that opens the {{site.data.keyword.bpshort}} 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 {{site.data.keyword.bpshort}} actions more quickly. {: shortdesc}
For a sample button, see the Deploy to {{site.data.keyword.cloud}}
button on the Sample Ansible playbook for {{site.data.keyword.cloud}} page.
{: tip}
{: #create-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{: external}.
-
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 {{site.data.keyword.bpshort}} actions create page. If you do not provide the name and Git repository URL, the
Deploy to {{site.data.keyword.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>
{: codeblock}
Example
https://cloud.ibm.com/schematics/actions/create?name=ansible-app-deploy&repository=https://github.com/Cloud-Schematics/ansible-app-deploy
{: codeblock}
-
Open your web browser and enter the URL.
-
Verify that the {{site.data.keyword.bpshort}} actions create page opens and that the Action name and Repository URL are pre-populated.
{: #add_an_image}
You can add an image to your URL to create your Deploy to {{site.data.keyword.cloud_notm}} button.
{: #add-button-html}
To add the button in an HTML page, such as a website, copy the following code into the page where you want to position the button. Replace <deployment URL>
with the URL for the {{site.data.keyword.bpshort}} action.
{: shortdesc}
<a href="<deployment URL>" target="_blank">
<img src="https://cloud.ibm.com/media/docs/images/icons/Deploy_to_cloud.svg" alt="Deploy to IBM Cloud button">
</a>
{: codeblock}
{: #add-button-markdown}
To add the button into a markdown file, such as in a repositories readme file, use the following syntax. Replace <deployment URL>
with the URL for the deployment link.
{: #sample-actions-nextsteps}
Explore the {{site.data.keyword.bpshort}} samples templates to deploy in your {{site.data.keyword.cloud_notm}} account. Looking for more code examples? Check out the samples for {{site.data.keyword.bplong_notm}} GitHub repositories{: external}.