# Local SSD storage as an alternative to our default distributed storage

## Overview

This guide aims to enable you to make use of the local SSD ephemeral storage provided as an alternative to the default distributed ephemeral storage in OpenStack Cloud.

## Prerequisites

- You should be able to use simple heat templates, like shown in the [getting-started guide](<https://documentation.syseleven.de/en/prior-docs/openstack-cloud/how-to/getting-started/index.md>).
- You know the basics of using the [OpenStack CLI-Tools](<https://documentation.syseleven.de/en/prior-docs/openstack-cloud/how-to/openstack-cli/index.md>).
- Environment variables are set, like shown in the [API-Access How-To](<https://documentation.syseleven.de/en/prior-docs/openstack-cloud/how-to/api-access/index.md>).

## How to setup an instance with local SSD storage

There are two ways to achieve this goal and we show both, beginning with the quickest one.

### Use our heat-example for a single server using local SSD as ephemeral storage

You will be working with the [heat examples repository](<https://github.com/syseleven/heat-examples>) on GitHub. Your first step is to clone it:

```shell
git clone https://github.com/syseleven/heat-examples
cd heat-examples/single-server-on-local-storage
```

Now you can create the example stack for local SSD storage:

```shell
openstack stack create -t example.yaml local-storage-example-stack -e example-env.yaml --parameter key_name=<ssh-key-name> --wait
```

In this command, `key_name` references an SSH-Key that you created in the [SSH Tutorial](<https://documentation.syseleven.de/en/prior-docs/openstack-cloud/how-to/ssh-keys/index.md>).

You have now created a very basic server with its ephemeral storage on local SSD.

### Use another tutorial or heat-example

You can use any other tutorial or heat-example and modify it to use local SSD storage instead of distributed storage. That does not always make sense, since not all workloads profit from local SSD storage, but it is in principle possible. Just follow the instructions to the point right before `openstack stack create` gets executed. Edit the stack file(s) and substitute the `m1.*` flavor with the corresponding `l1.*` flavor. If you then continue to create the stack, the server(s) will be created using local SSD storage as ephemeral storage. This does not apply to attached volumes, that will continue to use distributed storage.

## Implications

See our [Background article about Local SSD Storage](<https://documentation.syseleven.de/en/prior-docs/openstack-cloud/background/local-storage/index.md>) for more information about the implications of using local SSD storage.

## Summary / Conclusion

You now have created a basic server with local SSD storage and learned, how to modify other tutorials to make use of local SSD storage. You should now be able to do anything you were able to do with distributed storage, with local storage as well.
