diff --git a/content/install_maintain/installation/installing-manager.md b/content/install_maintain/installation/installing-manager.md index 95dc87b10..c93dd248d 100644 --- a/content/install_maintain/installation/installing-manager.md +++ b/content/install_maintain/installation/installing-manager.md @@ -157,7 +157,7 @@ The arguments are optional if already configured in `config.yaml` (see [{{< para ## First Deployment -Check out your new {{< param cfy_manager_name >}} by installing the [Local Hello-World Example Deployment]({{< relref "trial_getting_started/examples/local/local_hello_world_example.md" >}}). +Check out your new {{< param cfy_manager_name >}} by installing the [Local Hello-World Example Deployment]({{< relref "trial_getting_started/examples/fundamentals/" >}}). This example demonstrates how you can use {{< param product_name >}} to easily install a local HTTP server with a hello-world page on it. diff --git a/content/install_maintain/installation/manager-image.md b/content/install_maintain/installation/manager-image.md index 1be875dd3..bf5d3fa9c 100644 --- a/content/install_maintain/installation/manager-image.md +++ b/content/install_maintain/installation/manager-image.md @@ -109,5 +109,5 @@ After {{< param cfy_manager_name >}} is installed, you can configure your {{< pa ## First Deployment -Check out your new {{< param cfy_manager_name >}} by installing the [Local Hello-World Example Deployment]({{< relref "trial_getting_started/examples/local/local_hello_world_example.md" >}}). +Check out your new {{< param cfy_manager_name >}} by installing the [Local Hello-World Example Deployment]({{< relref "trial_getting_started/examples/fundamentals/" >}}). This example demonstrates how you can use {{< param product_name >}} to easily install a local HTTP server with a hello-world page on it. diff --git a/content/trial_getting_started/examples/basic/aws_basics.md b/content/trial_getting_started/examples/basic/aws_basics.md index bc665e6c7..07c275554 100644 --- a/content/trial_getting_started/examples/basic/aws_basics.md +++ b/content/trial_getting_started/examples/basic/aws_basics.md @@ -23,215 +23,81 @@ In this example we will deploy only the infrastructure. Later, in the more advanced examples (multi cloud examples) we will leverage this setup as the basis for deploying a generic application server and an application. +You should already be familiar with the concepts from the [Fundamentals Example.]({{< relref "/trial_getting_started/examples/fundamentals/" >}}) + ## Prerequisites This example expects the following prerequisites: * A {{< param cfy_manager_name >}} setup ready. This can be either a [{{< param mgr_hosted_title >}}]({{< param mgr_hosted_link >}}), a [{{< param mgr_premium_title >}}]({{< param mgr_premium_link >}}), or a [{{< param mgr_community_title >}}]({{< param mgr_community_link >}}). -* Access to {{< param cloud >}} infrastructure is required to demonstrate this example. - -#### {{< param cfy_cli_name >}} or {{< param cfy_console_name >}}? - -{{< param product_name >}} allows for multiple user interfaces. Some users find the {{< param cfy_console_name >}} (web based UI) more intuitive while others prefer the {{< param cfy_cli_name >}} (Command Line Interface). This tutorial and all following ones will describe both methods. - -* [Using the {{< param cfy_console_name >}}](#cloudify-management-console) -* [Using the {{< param cfy_cli_name >}}](#cloudify-cli) - -{{% note %}} -Community version - Some of the options described in the guide are not available in the community version management console (web UI). An example would be setting up secrets. You can still perform all of the functionality using the {{< param cfy_cli_name >}}. -{{% /note %}} - -## {{< param cfy_console_name >}} - -This section explains how to run the above described steps using the {{< param cfy_console_name >}}. -The {{< param cfy_console_name >}} and {{< param cfy_cli_name >}} can be used interchangeably for all {{< param product_name >}} activities. +* Access to {{< param cloud >}} infrastructure is required to demonstrate this example {and you already configured AWS API Keys}. +**NOTE** , if you don't have that already ... +{{< param cloud >}} credentials can be created by following the guide [here]({{< param cloud_auth_ui_link>}}). +## Deployment Steps ### Create Secrets -To connect to {{< param cloud >}}, credentials are required. -{{< param product_name >}} recommends storing such sensitive information in a {{< param product_name >}} secret. -Secrets are kept encrypted in a secure way and used in run-time by the system. -Learn more about {{< param product_name >}} secrets [here]({{< relref "/working_with/manager/using-secrets.md" >}}). +Credentials are required to connect to {{< param cloud >}}. {{< param product_name >}} recommends storing such sensitive information in a {{< param product_name >}} secret. -{{< param cloud >}} credentials can be created by following the guide [here]({{< param cloud_auth_ui_link>}}). +Please refer to the [Fundamentals Example]({{< relref "/trial_getting_started/examples/fundamentals/" >}}) for an explanation of how to create secrets using the [UI]({{< relref "/trial_getting_started/examples/fundamentals/#create-secrets" >}}) or [CLI]({{< relref "/trial_getting_started/examples/fundamentals/#create-secrets-1" >}}) -To store the access keys as secrets in the {{< param cfy_manager_name >}}, login to the {{< param cfy_console_name >}} and select the **System Resources** page. Scroll to the **Secret Store Management** widget and use the **Create** button to add the following new secrets: +Create the following secrets in the {{< param cfy_manager_name >}}: + +| Secret Name | Description | +| ---------------------------------------------------------------- | ------------------------------------ | +| `aws_access_key_id` | The access key ID used to access AWS | +| `aws_secret_access_key` | The secret access key used to access AWS | -* aws_access_key_id -* aws_secret_access_key -![Required secrets for this example]( /images/trial_getting_started/aws_basic/Screenshot249.png ) ### Upload Plugins -Plugins are {{< param product_name >}}'s extendable interfaces to services, cloud providers and automation tools. -I.e., connecting to {{< param cloud >}} requires the {{< param cloud >}} plugin. +Connecting to {{< param cloud >}} requires the {{< param cloud >}} plugin. This example also requires the Utilities plugin. -To upload the required plugins to your manager, select the **Cloudify Catalog** page, scroll to the **Plugins Catalog** widget and select the plugins you wish to upload. +Please refer to the [Fundamentals Example]({{< relref "/trial_getting_started/examples/fundamentals/" >}}) for an explanation of how to upload plugins using the [UI]({{< relref "/trial_getting_started/examples/fundamentals/#upload-plugins" >}}) or [CLI]({{< relref "/trial_getting_started/examples/fundamentals/#upload-plugins-1" >}}) -For this example, upload the following plugins: +Upload the following plugins to the {{< param cfy_manager_name >}}: * Utilities * {{< param cloud >}} - - ### Upload Blueprint -A blueprint is a general purpose model for describing systems, services or any orchestrated object topology. -Blueprints are represented as descriptive code (yaml based files) and typically stored and managed as part of the source repository. -The {{< param cloud >}} infrastructure blueprint is available [here]({{< param basic_blueprint_master >}}/{{< param blueprint_name >}}). - -The flow required to setup a service consists of: - -1. Upload the blueprint describing the service to the {{< param cfy_manager_name >}}. -1. Create a deployment from the uploaded blueprint. This generates a model of the service topology in the {{< param product_name >}} database and provides the "context" needed for running workflows. -1. Run the **install** workflow for the created deployment to apply the model to the infrastructure. +The blueprint for this example describes all of the components in the environment's topology. Upload a new blueprint to the {{< param cfy_manager_name >}} with the values below. -Let's run these one by one. +Please refer to the [Fundamentals Example]({{< relref "/trial_getting_started/examples/fundamentals/" >}}) for an explanation of how to upload a blueprint using the [UI]({{< relref "/trial_getting_started/examples/fundamentals/#upload-blueprint" >}}) or [CLI]({{< relref "/trial_getting_started/examples/fundamentals/#upload-blueprint-and-deploy" >}}) -To upload a blueprint to the {{< param cfy_manager_name >}}, select the **Cloudify Catalog** page, and use the **Upload blueprint** button next to the {{< param cloud >}}-Basics-VM-Setup blueprint. +* **Blueprint package**: `https://github.com/cloudify-community/blueprint-examples/releases/download/latest/virtual-machine.zip` +* **Blueprint name**: `` +* **Blueprint YAML file**: aws.yaml +### Deploy and Install +Once the blueprint has been uploaded, it will be displayed on the Blueprints page. Create a new deployment, adjusting any inputs as needed. - -### Deploy & Install - -Once the blueprint is uploaded, it will be displayed in the Blueprints widget. to deploy the blueprint click the **Create deployment** button next to the blueprint you wish to deploy. Specify a deployment name, update any inputs (such as the {{< param cloud >}} region), and click **Deploy & Install**. Changing inputs is completely optional and the defaults are safe to use. +Please refer to the [Fundamentals Example]({{< relref "/trial_getting_started/examples/fundamentals/" >}}) for an explanation of how to create a deployment using the [UI]({{< relref "/trial_getting_started/examples/fundamentals/#deploy-and-install" >}}) or [CLI]({{< relref "/trial_getting_started/examples/fundamentals/#upload-blueprint-and-deploy" >}}) ![Create a Deployment]( /images/trial_getting_started/aws_basic/Screenshot259.png ) -You will be directed to the **Deployment** page and will be able to track the progress of the execution. - -The deployment you have created should be displayed in the deployments list in the **Deployments** page. +You will be directed to the **Deployment** page and will be able to track the progress of the execution: ![Track the progress of a Workflow]( /images/trial_getting_started/aws_basic/Screenshot261.png ) ### Validate -In this example we have setup a simple infrastructure. A virtual instance (VM) was created in the region specified in the Deployment inputs alongside a new network and various other resources. - -* Go to your {{< param cloud >}} console and see the new instance and other resources that were created. -* Examine the Deployment page in the {{< param cfy_console_name >}} for more information about your deployed nodes, topology, and view the installation logs. - -To login to your new {{< param cloud >}} instance, you can look at the **Deployment Outputs/Capabilities** widget on the Deployment screen to find your {{< param cloud >}} instance public IP, SSH username, and SSH private key. - -![Get Deployment outputs]( /images/trial_getting_started/aws_basic/Screenshot263.png ) - -### Teardown - -To remove the deployment and destroy the orchestrated infrastructure resources, run the **Uninstall** workflow by clicking the **Execute workflow** menu next to the deployment, expanding **Default workflows**, and selecting **Uninstall**. - - -____ - - -## {{< param cfy_cli_name >}} - -Create a CLI profile instructing your CLI how to connect with the {{< param cfy_manager_name >}} by running the following CLI commands - -```bash -cfy init -cfy profiles use -u admin -p --ssl -cfy profiles set --manager-tenant default_tenant -``` - -### Create Secrets - -To enable {{< param product_name >}} to connect to {{< param cloud >}}, credentials are required. -{{< param product_name >}} recommends storing such sensitive information as a {{< param product_name >}} secret. -Secrets are encrypted in a secure way and used during run-time by the system. -Learn more about {{< param product_name >}} secrets [here]({{< relref "/working_with/manager/using-secrets.md" >}}). - -{{< param cloud >}} credentials can be created by following the guide [here]({{< param cloud_auth_cli_link>}}). - -To store the access keys as secrets via the {{< param cfy_cli_name >}}, run the following (replacing with the actual string retrieved from {{< param cloud >}}): - -```bash -cfy secrets create aws_access_key_id --secret-string -cfy secrets create aws_secret_access_key --secret-string -``` - -### Upload Plugins - -Plugins are {{< param product_name >}}'s extendable interfaces to services, cloud providers, and automation tools. -Connecting to {{< param cloud >}} requires the {{< param cloud >}} plugin. You may upload specific plugins or, for simplicity, upload the plugin bundle containing all of the basic, pre-packaged, plugins. - -To upload the default plugins bundle (this may take a few minutes depending on your internet speed): -```bash -cfy plugins bundle-upload -``` - -**Tip**: Read more about [plugins]({{< relref "/working_with/official_plugins/_index.md" >}}) and [writing your own plugins]({{< relref "/developer/writing_plugins/_index.md" >}}). - -### Upload Blueprint and Deploy - -A blueprint is a general purpose model for describing systems, services or any orchestrated object topology. Blueprints are represented as descriptive code (YAML-based files) and are typically stored and managed as part of the source code repository. - -The {{< param cloud >}} infrastructure blueprint is available [here]({{< param basic_blueprint_master >}}/{{< param blueprint_name >}}). - -Uploading a blueprint to {{< param product_name >}} can be done by direct upload or by providing the link in the source code repository. -The flow to do that is: - - 1. Upload the blueprint. - 1. Create a deployment from the uploaded blueprint. This generates a model of the service topology in the {{< param product_name >}} database and provides the "context" needed for running workflows. - 1. Run the **install** workflow for the created deployment to apply the model to the infrastructure. - -In order to perform this flow as a single unit, we will use the **install** command. - -```bash -cfy install {{< param basic_blueprint_zip >}} -n {{< param blueprint_name >}} -``` - -### Validate - -In this example we have setup a simple infrastructure. A virtual instance (VM) was created in the region specified in the Deployment inputs alongside a new network and various other resources. - -* Go to your {{< param cloud >}} console and see the new instance and other resources that were created. -* You can easily get a list of all deployed nodes by running: - -``` -$ cfy nodes list -d {{< param deployment_name >}} +This example deployed a simple infrastructure. A virtual instance (VM) was created in the region specified in the Deployment inputs along with a new network and other resources. You can validate this deployment by: -Listing nodes for deployment {{< param deployment_name >}}... +* Navigating to the {{< param cloud >}} console and verifying that the new instance and other resources were created. +* Examining the Deployment page in the {{< param cfy_console_name >}} for more information about your deployed nodes, topology, installation logs. -Nodes: -+--------------------------------------+---------------------+---------------------+---------+-------------------------------------------------+------------+----------------+---------------------+-----------------------------+------------+ -| id | deployment_id | blueprint_id | host_id | type | visibility | tenant_name | number_of_instances | planned_number_of_instances | created_by | -+--------------------------------------+---------------------+---------------------+---------+-------------------------------------------------+------------+----------------+---------------------+-----------------------------+------------+ -| subnet | {{< param deployment_name >}} | {{< param deployment_name >}} | | cloudify.nodes.aws.ec2.Subnet | tenant | default_tenant | 1 | 1 | admin | -| ami | {{< param deployment_name >}} | {{< param deployment_name >}} | | cloudify.nodes.aws.ec2.Image | tenant | default_tenant | 1 | 1 | admin | -| routetable | {{< param deployment_name >}} | {{< param deployment_name >}} | | cloudify.nodes.aws.ec2.RouteTable | tenant | default_tenant | 1 | 1 | admin | -| internet_gateway | {{< param deployment_name >}} | {{< param deployment_name >}} | | cloudify.nodes.aws.ec2.InternetGateway | tenant | default_tenant | 1 | 1 | admin | -| nic | {{< param deployment_name >}} | {{< param deployment_name >}} | | cloudify.nodes.aws.ec2.Interface | tenant | default_tenant | 1 | 1 | admin | -| cloud_init | {{< param deployment_name >}} | {{< param deployment_name >}} | | cloudify.nodes.CloudInit.CloudConfig | tenant | default_tenant | 1 | 1 | admin | -| vm | {{< param deployment_name >}} | {{< param deployment_name >}} | vm | cloudify.nodes.aws.ec2.Instances | tenant | default_tenant | 1 | 1 | admin | -| security_group_rules | {{< param deployment_name >}} | {{< param deployment_name >}} | | cloudify.nodes.aws.ec2.SecurityGroupRuleIngress | tenant | default_tenant | 1 | 1 | admin | -| vpc | {{< param deployment_name >}} | {{< param deployment_name >}} | | cloudify.nodes.aws.ec2.Vpc | tenant | default_tenant | 1 | 1 | admin | -| ip | {{< param deployment_name >}} | {{< param deployment_name >}} | | cloudify.nodes.aws.ec2.ElasticIP | tenant | default_tenant | 1 | 1 | admin | -| security_group | {{< param deployment_name >}} | {{< param deployment_name >}} | | cloudify.nodes.aws.ec2.SecurityGroup | tenant | default_tenant | 1 | 1 | admin | -| route_public_subnet_internet_gateway | {{< param deployment_name >}} | {{< param deployment_name >}} | | cloudify.nodes.aws.ec2.Route | tenant | default_tenant | 1 | 1 | admin | -+--------------------------------------+---------------------+---------------------+---------+-------------------------------------------------+------------+----------------+---------------------+-----------------------------+------------+ -Showing 12 of 12 nodes -``` -**Tip**: To check out some more commands to use with the {{< param cfy_console_name >}}, run `cfy --help` +You can log in to the newly deployed {{< param cloud >}} instance by obtaining the public IP, SSH username, and SSH private key from ouputs and capabilities. -An even easier way to review your deployment is through the [{{< param cfy_console_name >}}](#validate). -Login to the console and browse to the **Deployments** page. -Select the deployment (`{{< param deployment_name >}}`) and explore the topology, inputs, outputs, nodes, and logs. - -![aws_simple_vm_topology.png]( /images/trial_getting_started/aws_simple_vm_topology.png ) - -This is also a good time to examine the blueprint used in the example. -The blueprint can be examined in the {{< param cfy_console_name >}}, however in this case -we will go to the {{< param product_name >}} examples repository in Github and examine it there: [{{< param blueprint_name >}}]({{< param basic_blueprint_master >}}/{{< param blueprint_name >}}) +Please refer to the [Fundamentals Example]({{< relref "/trial_getting_started/examples/fundamentals/" >}}) for an explanation of verification steps, including how to obtain outputs and capabilities using the [UI]({{< relref "/trial_getting_started/examples/fundamentals/#validate" >}}) or [CLI]({{< relref "/trial_getting_started/examples/fundamentals/#validate-1" >}}) +![Get Deployment outputs]( /images/trial_getting_started/aws_basic/Screenshot263.png ) ### Teardown -To remove the deployment and delete all resources from {{< param cloud >}} simply run the uninstall command: -```bash -cfy uninstall {{< param deployment_name >}} -``` +Once you are done testing the environment, you can teardown the deployed resources. Please refer to the [Fundamentals Example]({{< relref "/trial_getting_started/examples/fundamentals/" >}}) for an explanation of teardown steps using the [UI]({{< relref "/trial_getting_started/examples/fundamentals/#teardown" >}}) or [CLI]({{< relref "/trial_getting_started/examples/fundamentals/#teardown-1" >}}) diff --git a/content/trial_getting_started/examples/fundamentals/_index.md b/content/trial_getting_started/examples/fundamentals/_index.md new file mode 100644 index 000000000..f92381d68 --- /dev/null +++ b/content/trial_getting_started/examples/fundamentals/_index.md @@ -0,0 +1,222 @@ ++++ +blueprint_name = "blueprint.yaml" + +title = "Level 1: Fundamentals" +description = "Install plugins, create secrets, deploy your first blueprint, and learn fundamental concepts." + +weight = 10 +alwaysopen = false ++++ + +This section explains the fundamental concepts behind the {{< param cfy_manager_name >}}. You will learn several key concepts needed for future examples, including: +* An overview of blueprints +* Creating secrets +* Uploading plugins +* Uploading blueprints +* Creating a deployment +* Verifying a deployment +* Tearing down a deployment + +This example deploys a local HTTP server with a "hello world" web page. The local web server runs entirely on the {{< param cfy_manager_name >}}, and no external IaaS or cloud credentials are needed. + +You will learn how to upload, install, validate, and deprovision an environment using a blueprint. A blueprint is a general purpose model for describing systems, services, or any orchestrated object topology. Blueprints are represented as descriptive code (YAML-based files) and typically stored and managed as part of a source repository. + +The blueprint for this example is available [here]({{< param first_service_blueprint_local >}}/{{< param blueprint_name >}}). + + +## Prerequisites + +This example expects the following prerequisites: + +* A {{< param cfy_manager_name >}} setup ready. This can be either a [{{< param mgr_hosted_title >}}]({{< param mgr_hosted_link >}}), a [{{< param mgr_premium_title >}}]({{< param mgr_premium_link >}}), or a [{{< param mgr_community_title >}}]({{< param mgr_community_link >}}). + + +## {{< param cfy_cli_name >}} vs. {{< param cfy_console_name >}} + +{{< param product_name >}} allows for multiple user interfaces. Some users find the {{< param cfy_console_name >}} (web based UI) more intuitive, while others prefer the {{< param cfy_cli_name >}} (Command Line Interface). These tutorials will describe both methods: + +* [Using the {{< param cfy_console_name >}}](#cloudify-management-console) +* [Using the {{< param cfy_cli_name >}}](#cloudify-cli) + +If you prefer to use the {{< param cfy_cli_name >}}, then you will need to either use the CLI included on your {{< param cfy_manager_name >}} or [install the CLI.](https://docs.cloudify.co/latest/cloudify_manager/cloudify_cli/) + +## {{< param cfy_console_name >}} + +This section explains how to run the Hello World example using the {{< param cfy_console_name >}}. The {{< param cfy_console_name >}} and {{< param cfy_cli_name >}} can be used interchangeably for all {{< param product_name >}} activities. + +The flow required to setup a service consists of the following steps: + +1. Upload the blueprint describing the service to the {{< param cfy_manager_name >}}. +1. Create a deployment from the uploaded blueprint. This generates a model of the service topology in the {{< param product_name >}} database and provides the "context" needed for running workflows. +1. Run the **install** workflow for the created deployment to apply the model to the infrastructure. + +### Create secrets + +This particular example does not require any secrets in the {{< param cfy_manager_name >}}. However, future examples will ask you to create secrets. Therefore, understanding how to create secrets is an important skill. + +To create a new secret, navigate to **Resources > Secrets**. Click the **Create** button and provide a key and value for the secret. For example, create a new secret with a key of "hello" and a value of "world": + +![Creating a secret]( /images/trial_getting_started/first_service/fundamentals/create_secrets.png ) + +You can use the "Hidden Value" checkbox to hide the secret value in the UI. You can also upload secrets from files. + +Once a secret has been uploaded to the {{< param cfy_manager_name >}}, it can be used in blueprints. You will leverage secrets in future examples. + +### Upload plugins + +Plugins are {{< param product_name >}}'s extendable interfaces to services, cloud providers and automation tools. For example: connecting to a cloud provider, such as AWS, requires the AWS plugin. + +This particular example does not require any plugins to work. However, future examples will show you how to integrate with cloud providers and automation tools using plugins. Therefore, understanding how to upload plugins is an important skill. + +To upload a plugin, navigate to **Resources > Plugins**. Use the **Upload > Upload from Marketplace** button to load the marketplace of available plugins. Select any plugin and click the upload button to add the plugin to the {{< param cfy_manager_name >}}: + +![Uploading a plugin]( /images/trial_getting_started/first_service/fundamentals/upload_plugins.png ) + +Once a plugin has been uploaded to {{< param cfy_manager_name >}}, it can be used in blueprints. You will leverage several plugins in future examples to orchestrate cloud and application resources. + +### Upload Blueprint + +To upload a blueprint to the {{< param cfy_manager_name >}}, select the **Blueprints** page and use the **Upload** button. Provide the following inputs to the modal: + +* Blueprint package: [link]({{< param first_service_blueprint_local_zip >}}) +* Blueprint name: {{< param first_service_blueprint_local_name >}} +* Blueprint YAML file: {{< param blueprint_name >}} + +![Upload a Blueprint]( /images/trial_getting_started/first_service/fundamentals/upload_blueprint.png ) + +### Deploy and Install + +Once the blueprint is uploaded, it will be displayed in the Blueprints widget. To deploy the blueprint, click the **Deploy** button next to the blueprint you wish to deploy. Specify the deployment name and click **Install**: + +>Note: you can also levrage deploy feature which will create the deployment and not trigger install , which you can do later on. + +![Create a deployment]( /images/trial_getting_started/first_service/fundamentals/create_deployment.png ) + +You will be directed to the **Deployment** page and will be able to track the progress of the execution: + +![Deployment page]( /images/trial_getting_started/first_service/fundamentals/deployment_page.png ) + + +The deployment you have created for a particular blueprint will be displayed in the deployments list for that blueprint: + +![Deployment list]( /images/trial_getting_started/first_service/fundamentals/deployment_list.png ) + +### Validate + +The example blueprint deploys a simple HTTP service with a static website. It runs locally on the {{< param cfy_manager_name >}}. Once the deployment process has finished running, you can view the outputs and capabilities for the deployment by navigating to the **Deployment Info** page: + +TODO: screenshot + +To access the web server, simply navigate to the appropriate application endpoint: + + * `http://127.0.0.1:8000` if you are using your local machine or a Docker container as the {{< param cfy_manager_name >}} machine. + * `http://:8000` if you are using a VM as the {{< param cfy_manager_name >}} machine. + * `http://}} URL>:8000` if you are using {{< param cfy_caas >}}. + +### Teardown + +To remove the deployment and destroy the orchestrated service, run the **Uninstall** workflow by clicking the **Deployment actions** button on the deployment page and selecting **Uninstall**. Click the **Execute** button on the modal. + +![Uninstall deployment]( /images/trial_getting_started/first_service/fundamentals/uninstall.png ) + + +## {{< param cfy_cli_name >}} + +This section explains how to run the Hello World example using the {{< param cfy_cli_name >}}. The {{< param cfy_console_name >}} and {{< param cfy_cli_name >}} can be used interchangeably for all {{< param product_name >}} activities. + +The {{< param cfy_cli_name >}} enables you to upload a blueprint, create a deployment, and run the install workflow using a single command. + +### Create secrets + +This particular example does not require any secrets in the {{< param cfy_manager_name >}}. However, future examples will ask you to create secrets. Therefore, understanding how to create secrets is an important skill. + +Secrets can be created using the `cfy secrets create` command. For example, create a new secret with a key of "hello" and a value of "world": + +```bash +$ cfy secrets create hello --secret-string world +Secret `hello` created +``` + +If the secret already exists in your manager, you can update the value using the `-u` flag: + +```bash +$ cfy secrets create hello -u --secret-string newValue +Secret `hello` created +``` + +### Upload plugins + +Plugins are {{< param product_name >}}'s extendable interfaces to services, cloud providers and automation tools. For example: connecting to a cloud provider, such as AWS, requires the AWS plugin. + +This particular example does not require any plugins to work. However, future examples will show you how to integrate with cloud providers and automation tools using plugins. Therefore, understanding how to upload plugins is an important skill. + +While individual plugins can be uploaded via the CLI, the easiest method to begin using plugins is to upload the default plugins bundle: + +```bash +$ cfy plugins bundle-upload +Starting upload of plugins bundle, this may take few minutes to complete. +``` + +### Upload Blueprint and Deploy + +Uploading a blueprint to {{< param product_name >}} can be done by direct upload or by providing the link in the source code repository. This involves the following steps: + +1. Upload the blueprint describing the service to the {{< param cfy_manager_name >}}. +1. Create a deployment from the uploaded blueprint. This generates a model of the service topology in the {{< param product_name >}} database and provides the "context" needed for running workflows. +1. Run the **install** workflow for the created deployment to apply the model to the infrastructure. + +To perform this flow as a single operation, you can use the `install` command: + +```bash +cfy install {{< param first_service_blueprint_local_zip >}} -n {{< param blueprint_name >}} +``` +The command takes a path to a blueprint archive, which can be a URL or a location on the local filesystem. The `-n` flag specifies the blueprint file within the archive. + +### Validate + +The example blueprint deploys a simple HTTP service with a static website. It runs locally on the {{< param cfy_manager_name >}}. + +You can list all of the deployments in the {{< param cfy_manager_name >}} with the `deployments list` command: + +```bash +$ cfy deployments list +Listing all deployments... + +Deployments: ++----------------------------+----------------------------+----------------------------+--------------------------+--------------------------+------------+----------------+------------+-----------+--------+-------------------+---------------------+ +| id | display_name | blueprint_id | created_at | updated_at | visibility | tenant_name | created_by | site_name | labels | deployment_status | installation_status | ++----------------------------+----------------------------+----------------------------+--------------------------+--------------------------+------------+----------------+------------+-----------+--------+-------------------+---------------------+ +| simple-hello-world-example | simple-hello-world-example | simple-hello-world-example | 2022-11-08 18:30:07.188 | 2022-11-08 18:30:07.188 | tenant | default_tenant | admin | | | good | active | ++----------------------------+----------------------------+----------------------------+--------------------------+--------------------------+------------+----------------+------------+-----------+--------+-------------------+---------------------+ + +Showing 1 of 1 deployments +``` + +You can view the outputs and capabilities of a particular deployment with the `deployment outputs` and `deployment capabilities` commands. Each command takes a deployment ID as an argument: + +```bash +$ cfy deployment outputs simple-hello-world-example +Retrieving outputs for deployment simple-hello-world-example... + - "application_endpoint": + Description: The external endpoint of the application. + Value: http://192.168.1.10:8000 + +$ cfy deployment capabilities simple-hello-world-example +Retrieving capabilities for deployment simple-hello-world-example... + +``` + +To access it, simply navigate to the appropriate endpoint: + + * `http://127.0.0.1:8000` if you are using your local machine or a Docker container as the {{< param cfy_manager_name >}} machine. + * `http://:8000` if you are using a VM as the {{< param cfy_manager_name >}} machine. + * `http://}} URL>:8000` if you are using {{< param cfy_caas >}}. + +### Teardown + +To remove the deployment and destroy the orchestrated service, run the `uninstall` command: +```bash +cfy uninstall simple-hello-world-example +``` + +This will execute the uninstall workflow, delete the deployment, and remove the blueprint. diff --git a/content/trial_getting_started/examples/local/_index.md b/content/trial_getting_started/examples/local/_index.md deleted file mode 100644 index 4a4b35d89..000000000 --- a/content/trial_getting_started/examples/local/_index.md +++ /dev/null @@ -1,10 +0,0 @@ -+++ -title = "Level 1: Local Hello-World" -description = "Deploy your first blueprint installing a local web-server and publish a web page" -weight = 10 -alwaysopen = false -+++ - -The Hello-World example walks you through your first blueprint deployment. Through an installation of a local web server and setup of a basic page you will learn the basics of {{< param product_name >}}. This example does **not** require IaaS credentials. - -{{%children style="h3" description="true"%}} diff --git a/content/trial_getting_started/examples/local/local_hello_world_example.md b/content/trial_getting_started/examples/local/local_hello_world_example.md deleted file mode 100644 index 783e7ad0a..000000000 --- a/content/trial_getting_started/examples/local/local_hello_world_example.md +++ /dev/null @@ -1,143 +0,0 @@ -+++ -blueprint_name = "blueprint.yaml" -deployment_name = "Deploy your first blueprint installing a local web-server and publish a web page" - - -title = "Level 1: Hello-World" -description = "Deploy your first blueprint installing a local web-server and publish a web page" - -weight = 10 -alwaysopen = false -+++ - -This example demonstrates a simple deployment of local HTTP server with a hello-world page on it. - - -## Prerequisites -This example expects the following prerequisites: - -* A {{< param cfy_manager_name >}} setup ready. This can be either a [{{< param mgr_hosted_title >}}]({{< param mgr_hosted_link >}}), a [{{< param mgr_premium_title >}}]({{< param mgr_premium_link >}}), or a [{{< param mgr_community_title >}}]({{< param mgr_community_link >}}). - - -#### {{< param cfy_cli_name >}} or {{< param cfy_console_name >}}? - -{{< param product_name >}} allows for multiple user interfaces. Some users find the {{< param cfy_console_name >}} (web based UI) more intuitive while others prefer the {{< param cfy_cli_name >}} (Command Line Interface). This tutorial and all following ones will describe both methods. - -* [Using the {{< param cfy_console_name >}}](#cloudify-management-console) -* [Using the {{< param cfy_cli_name >}}](#cloudify-cli) - -{{% note %}} -Community version - Some of the options described in the guide are not available in the community version management console (web UI). An example would be setting up secrets. You can still perform all of the functionality using the {{< param cfy_cli_name >}}. -{{% /note %}} - -## {{< param cfy_console_name >}} - -This section explains how to run the above described steps using the {{< param cfy_console_name >}}. -The {{< param cfy_console_name >}} and {{< param cfy_cli_name >}} can be used interchangeably for all {{< param product_name >}} activities. - -### Upload Blueprint - -A blueprint is a general purpose model for describing systems, services or any orchestrated object topology. -Blueprints are represented as descriptive code (yaml based files) and typically stored and managed as part of the source repository. -The blueprint is available [here]({{< param first_service_blueprint_local >}}/{{< param blueprint_name >}}). - -The flow required to setup a service consists of: - -1. Upload the blueprint describing the service to the {{< param cfy_manager_name >}}. -1. Create a deployment from the uploaded blueprint. This generates a model of the service topology in the {{< param product_name >}} database and provides the "context" needed for running workflows. -1. Run the **install** workflow for the created deployment to apply the model to the infrastructure. - -Let's run these one by one. - -To upload a blueprint to the {{< param cfy_manager_name >}}, select the **Local Blueprints** page, and use the **Upload** button. - -* Blueprint package: [link]({{< param first_service_blueprint_local_zip >}}) -* Blueprint name: {{< param first_service_blueprint_local_name >}} -* Blueprint YAML file: {{< param blueprint_name >}} - -![Upload a Blueprint]( /images/trial_getting_started/first_service/local/upload_blueprint.png ) - -### Deploy & Install - -Once the blueprint is uploaded, it will be displayed in the Blueprints widget. to deploy the blueprint click the **Create deployment** button next to the blueprint you wish to deploy. Specify the deployment name and click **Deploy & Install** - -You will be directed to the **Deployment** page and will be able to track the progress of the execution. - -The deployment you have created should be displayed in the deployments list in the **Deployments** page. - - - -### Validate - -In this example we have setup a simple HTTP service hosting a static site. - -To access it, simply open your browser to: - - * `http://127.0.0.1:8000` if you are using your local machine, or a docker container as the {{< param cfy_manager_name >}} machine. - * `http://:8000` if you are using a VM as the {{< param cfy_manager_name >}} machine. - * `http://}} URL>:8000` if you are using {{< param cfy_caas >}}. - -### Teardown - -To remove the deployment and destroy the orchestrated service, run the **Uninstall** workflow by clicking the **Execute workflow** menu next to the deployment, expanding **Default workflows**, and selecting **Uninstall**. - - -____ - - -## {{< param cfy_cli_name >}} - -### Upload Blueprint and Deploy - -A blueprint is a general purpose model for describing systems, services or any orchestrated object topology. Blueprints are represented as descriptive code (YAML-based files) and are typically stored and managed as part of the source code repository. The blueprint is available [here]({{< param first_service_blueprint_local >}}/{{< param blueprint_name >}}). - -Uploading a blueprint to {{< param product_name >}} can be done by direct upload or by providing the link in the source code repository. -The flow to do that is: - - 1. Upload the blueprint. - 1. Create a deployment from the uploaded blueprint. This generates a model of the service topology in the {{< param product_name >}} database and provides the "context" needed for running workflows. - 1. Run the **install** workflow for the created deployment to apply the model to the infrastructure. - -In order to perform this flow as a single unit, we will use the **install** command. - -```bash -cfy install {{< param first_service_blueprint_local_zip >}} -n {{< param blueprint_name >}} -``` - -**Note**: Usually, in order to connect and deploy instances on cloud platforms (such as AWS, Azure etc.) -we need to upload the appropriate {{< param product_name >}} plugins, but in this example the infrastructure is local and not interacting with any cloud provider. - - -### Validate - -In this example we have setup a simple HTTP service hosting a static site. - -Firstly, in order to see that the deployment was successfully created, run: -```bash -$ cfy deployments list -Listing all deployments... - -Deployments: -+----------------------------+----------------------------+--------------------------+--------------------------+------------+----------------+------------+-----------+ -| id | blueprint_id | created_at | updated_at | visibility | tenant_name | created_by | site_name | -+----------------------------+----------------------------+--------------------------+--------------------------+------------+----------------+------------+-----------+ -| {{< param deployment_name >}} | {{< param deployment_name >}} | 2020-04-05 14:34:49.487 | 2020-04-05 14:34:49.487 | tenant | default_tenant | admin | | -+----------------------------+----------------------------+--------------------------+--------------------------+------------+----------------+------------+-----------+ - -Showing 1 of 1 deployments - -``` - -To access it, simply open your browser to: - - * `http://127.0.0.1:8000` if you are using your local machine, or a docker container as the {{< param cfy_manager_name >}} machine. - * `http://:8000` if you are using a VM as the {{< param cfy_manager_name >}} machine. - * `http://}} URL>:8000` if you are using {{< param cfy_caas >}}. - - -### Teardown - -To remove the deployment and destroy the orchestrated service, run the uninstall command: -```bash -cfy uninstall {{< param deployment_name >}} -``` diff --git a/content/trial_getting_started/set_trial_manager/download_community.md b/content/trial_getting_started/set_trial_manager/download_community.md index b42bc3274..25ac0699a 100644 --- a/content/trial_getting_started/set_trial_manager/download_community.md +++ b/content/trial_getting_started/set_trial_manager/download_community.md @@ -39,6 +39,6 @@ ____ What's next? * To manage your installation using the command line utility on your docker image refer to the [local CLI guide] ({{< relref "trial_getting_started/set_trial_manager/getting-started-with-cloudify-docker-and-cli" >}}) -* To run your first hello world example on your local manager refer to the **[local hello world example] ({{< relref "trial_getting_started/examples/local/local_hello_world_example" >}})** (no cloud credentials needed) +* To run your first hello world example on your local manager refer to the **[local hello world example] ({{< relref "trial_getting_started/examples/fundamentals/" >}})** (no cloud credentials needed) * To run your first multi cloud examples on AWS, Azure, GCP and OpenStack using the native {{< param product_name >}} plugins as well as Cloud Formation, Azure ARM and Ansible plugins refer to the **[example based tutorials]({{< relref "trial_getting_started/examples/_index.md" >}})**. -* To run your first Kubernetes service on OpenShift, KubeSpray, GKE, EKS or AKS refer to the [Kubernetes reference guide ]({{< relref "working_with/official_plugins/orchestration/kubernetes" >}}). \ No newline at end of file +* To run your first Kubernetes service on OpenShift, KubeSpray, GKE, EKS or AKS refer to the [Kubernetes reference guide ]({{< relref "working_with/official_plugins/orchestration/kubernetes" >}}). diff --git a/content/trial_getting_started/set_trial_manager/hosted_trial.md b/content/trial_getting_started/set_trial_manager/hosted_trial.md index f23223d42..1d48fc262 100644 --- a/content/trial_getting_started/set_trial_manager/hosted_trial.md +++ b/content/trial_getting_started/set_trial_manager/hosted_trial.md @@ -42,7 +42,7 @@ Congratulations! Your {{< param cfy_manager_name >}} is now ready to begin orche ## Step 3: Install your first deployment on your new {{< param cfy_manager_name >}} -Check out your new {{< param cfy_manager_name >}} by installing the [Local Hello-World Example Deployment]({{< relref "trial_getting_started/examples/local/local_hello_world_example.md" >}}). This is a great way to become familiar with the basic concepts of the {{< param cfy_manager_name >}}. +Check out your new {{< param cfy_manager_name >}} by installing the [Local Hello-World Example Deployment]({{< relref "trial_getting_started/examples/fundamentals/" >}}). This is a great way to become familiar with the basic concepts of the {{< param cfy_manager_name >}}. This example demonstrates how you can use {{< param product_name >}} to easily install a local HTTP server with a hello-world page on it. diff --git a/content/trial_getting_started/set_trial_manager/trial_install.md b/content/trial_getting_started/set_trial_manager/trial_install.md index aaa2c8805..8d76cc106 100644 --- a/content/trial_getting_started/set_trial_manager/trial_install.md +++ b/content/trial_getting_started/set_trial_manager/trial_install.md @@ -45,7 +45,7 @@ To activate your trial using the UI: Now that you have access to a {{< param cfy_manager_name >}} environment, we recommend performing some additional activities to become comfortable with {{< param company_name >}}. The ideas below are just suggestions to get you started on your journey! -* Try out the [local Hello World example]({{< relref "trial_getting_started/examples/local/local_hello_world_example" >}}) example using your new manager. No cloud credentials are required for this simple example. +* Try out the [local Hello World example]({{< relref "trial_getting_started/examples/fundamentals/" >}}) example using your new manager. No cloud credentials are required for this simple example. * Run your first multi-cloud example on AWS, Azure, GCP and OpenStack using the native {{< param product_name >}} plugins as well as Cloud Formation, Azure ARM, and Ansible plugins by following the **[example based tutorials]({{< relref "trial_getting_started/examples/_index.md" >}})**. * Run your first Kubernetes service on OpenShift, KubeSpray, GKE, EKS, or AKS by following the [Kubernetes reference guide]({{< relref "working_with/official_plugins/orchestration/kubernetes" >}}). * Manage your installation using the command line utility by reviewing the [local CLI guide]({{< relref "trial_getting_started/set_trial_manager/getting-started-with-cloudify-docker-and-cli" >}}). diff --git a/static/images/trial_getting_started/first_service/fundamentals/create_deployment.png b/static/images/trial_getting_started/first_service/fundamentals/create_deployment.png new file mode 100644 index 000000000..dc7ce288d Binary files /dev/null and b/static/images/trial_getting_started/first_service/fundamentals/create_deployment.png differ diff --git a/static/images/trial_getting_started/first_service/fundamentals/create_secrets.png b/static/images/trial_getting_started/first_service/fundamentals/create_secrets.png new file mode 100644 index 000000000..69d822f14 Binary files /dev/null and b/static/images/trial_getting_started/first_service/fundamentals/create_secrets.png differ diff --git a/static/images/trial_getting_started/first_service/fundamentals/deployment_list.png b/static/images/trial_getting_started/first_service/fundamentals/deployment_list.png new file mode 100644 index 000000000..8cf540990 Binary files /dev/null and b/static/images/trial_getting_started/first_service/fundamentals/deployment_list.png differ diff --git a/static/images/trial_getting_started/first_service/fundamentals/deployment_page.png b/static/images/trial_getting_started/first_service/fundamentals/deployment_page.png new file mode 100644 index 000000000..4677d8f01 Binary files /dev/null and b/static/images/trial_getting_started/first_service/fundamentals/deployment_page.png differ diff --git a/static/images/trial_getting_started/first_service/fundamentals/uninstall.png b/static/images/trial_getting_started/first_service/fundamentals/uninstall.png new file mode 100644 index 000000000..58bb5ba35 Binary files /dev/null and b/static/images/trial_getting_started/first_service/fundamentals/uninstall.png differ diff --git a/static/images/trial_getting_started/first_service/local/upload_blueprint.png b/static/images/trial_getting_started/first_service/fundamentals/upload_blueprint.png similarity index 100% rename from static/images/trial_getting_started/first_service/local/upload_blueprint.png rename to static/images/trial_getting_started/first_service/fundamentals/upload_blueprint.png diff --git a/static/images/trial_getting_started/first_service/fundamentals/upload_plugins.png b/static/images/trial_getting_started/first_service/fundamentals/upload_plugins.png new file mode 100644 index 000000000..576ad4ba6 Binary files /dev/null and b/static/images/trial_getting_started/first_service/fundamentals/upload_plugins.png differ