Initial commit of the NFS cluster type
This commit is contained in:
Родитель
0560fbda74
Коммит
3a095a335c
112
README.md
112
README.md
|
@ -1,3 +1,113 @@
|
|||
# Simple NFS Filesystem #
|
||||
|
||||
This project installs and configures a simple standalone NFS filesystem which may be mounted by other clusters.
|
||||
|
||||
The NFS server created in this sample has a single storage volume, exported at `/mnt/exports/data`. For real
|
||||
file server deployments, a wide variety of options are supported.
|
||||
|
||||
See the CycleCloud documentation for the full set of options for mounting and raiding volumes on the server, and configuring NFS exports and mounts:
|
||||
|
||||
- How to mount persistent storage volumes:
|
||||
- [Mounting Volumes](https://docs.cyclecomputing.com/user-guide-v6.6.1/storage/_mounting_volumes)
|
||||
- How to create an NFS export and mount it:
|
||||
- [Exporting and Mounting NFS](https://docs.cyclecomputing.com/user-guide-v6.6.1/storage/_mounting_nfs)
|
||||
|
||||
|
||||
<!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc-generate-toc again -->
|
||||
**Table of Contents**
|
||||
|
||||
- [Simple NFS Filesystem](#simple-nfs-filesystem)
|
||||
- [Pre-Requisites](#pre-requisites)
|
||||
- [Configuring the Project](#configuring-the-project)
|
||||
- [Deploying the Project](#deploying-the-project)
|
||||
- [Importing the Cluster Template](#importing-the-cluster-template)
|
||||
|
||||
<!-- markdown-toc end -->
|
||||
|
||||
|
||||
## Pre-Requisites ##
|
||||
|
||||
|
||||
This sample requires the following:
|
||||
|
||||
1. CycleCloud must be installed and running.
|
||||
|
||||
a. If this is not the case, see the CycleCloud QuickStart Guide for
|
||||
assistance.
|
||||
|
||||
2. The CycleCloud CLI must be installed and configured for use.
|
||||
|
||||
3. You must have access to log in to CycleCloud.
|
||||
|
||||
4. You must have access to upload data and launch instances in your chosen
|
||||
Cloud Provider account.
|
||||
|
||||
5. You must have access to a configured CycleCloud "Locker" for Project Storage
|
||||
(Cluster-Init and Chef).
|
||||
|
||||
6. Optional: To use the `cyclecloud project upload <locker>` command, you must
|
||||
have a Pogo configuration file set up with write-access to your locker.
|
||||
|
||||
a. You may use your preferred tool to interact with your storage "Locker"
|
||||
instead.
|
||||
|
||||
|
||||
## Configuring the Project ##
|
||||
|
||||
|
||||
The first step is to configure the project for use with your storage locker:
|
||||
|
||||
1. Open a terminal session with the CycleCloud CLI enabled.
|
||||
|
||||
2. Switch to the nfs_filer project directory.
|
||||
|
||||
|
||||
## Deploying the Project ##
|
||||
|
||||
|
||||
To upload the project (including any local changes) to your target locker, run the
|
||||
`cyclecloud project upload` command from the project directory. The expected output looks like
|
||||
this:
|
||||
|
||||
``` bash
|
||||
|
||||
$ cyclecloud project upload my_locker
|
||||
Sync completed!
|
||||
|
||||
```
|
||||
|
||||
|
||||
**IMPORTANT**
|
||||
|
||||
For the upload to succeed, you must have a valid Pogo configuration for your target Locker.
|
||||
|
||||
|
||||
## Importing the Cluster Template ##
|
||||
|
||||
|
||||
To import the cluster:
|
||||
|
||||
1. Open a terminal session with the CycleCloud CLI enabled.
|
||||
|
||||
2. Switch to the nfs_filer project directory.
|
||||
|
||||
3. Run ``cyclecloud import_template NFS -f templates/nfs.txt``.
|
||||
The expected output looks like this:
|
||||
|
||||
``` bash
|
||||
|
||||
$ cyclecloud import_template NFS -f templates/nfs.txt --force
|
||||
Importing template NFS....
|
||||
----------------------------
|
||||
NFS : *template*
|
||||
----------------------------
|
||||
Keypair:
|
||||
Cluster nodes:
|
||||
filer: off
|
||||
Total nodes: 1
|
||||
```
|
||||
|
||||
|
||||
|
||||
# Contributing
|
||||
|
||||
|
@ -11,4 +121,4 @@ provided by the bot. You will only need to do this once across all repos using o
|
|||
|
||||
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
|
||||
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
|
||||
contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
|
||||
contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
|
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 32 KiB |
|
@ -0,0 +1,6 @@
|
|||
[project]
|
||||
version = 1.0.0
|
||||
name = nfs
|
||||
|
||||
[spec default]
|
||||
run_list = recipe[cshared::directories], recipe[cuser], recipe[cshared::server]
|
|
@ -0,0 +1,5 @@
|
|||
|
||||
Files in this directory are automatically synced to any node using this spec. Content here
|
||||
can be anything from software packages to config files. Scripts can be used to install
|
||||
software packages or move files into the appropriate location on the node.
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
|
||||
Files in this directory are executed on the host in alphabetical order.
|
||||
It is recommended that files are named start with digits to ensure they
|
||||
are executed in the correct order, example:
|
||||
- 000_run_me_first.sh
|
||||
- 001_run_me_second.sh
|
||||
|
||||
Allowable file extensions on Linux: .sh
|
||||
Allowable file extensions on Windows: .bat, .cmd, .exe
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
|
||||
Files in this directory contains tests that will be run at cluster start
|
||||
when in testing mode. Please see the official documentation for more information
|
||||
on cluster testing.
|
||||
|
|
@ -0,0 +1,192 @@
|
|||
################################
|
||||
## NFS Server Template ##
|
||||
################################
|
||||
|
||||
[cluster nfs]
|
||||
FormLayout = selectionpanel
|
||||
Category = Infrastructure
|
||||
|
||||
[[node defaults]]
|
||||
|
||||
Credentials = $Credentials
|
||||
ImageName = $ImageName
|
||||
SubnetId = $SubnetId
|
||||
Region = $Region
|
||||
KeyPairLocation = ~/.ssh/cyclecloud.pem
|
||||
UsePublicNetwork = $UsePublicNetwork
|
||||
|
||||
[[node filer]]
|
||||
MachineType = $MachineType
|
||||
IsReturnProxy = $ReturnProxy
|
||||
|
||||
AdditionalClusterInitSpecs = $FileServerClusterInitSpecs
|
||||
|
||||
|
||||
[[[configuration]]]
|
||||
run_list = recipe[cganglia::server], recipe[cganglia::client]
|
||||
|
||||
cyclecloud.discoverable = true
|
||||
role = sharedfs
|
||||
|
||||
[[[volume nfs-vol1]]]
|
||||
Size = $FilesystemSize
|
||||
SSD = True
|
||||
Mount = nfs
|
||||
Persistent = $FileSystemPersistence
|
||||
|
||||
[[[configuration cyclecloud.mounts.nfs]]]
|
||||
mountpoint = /mnt/exports
|
||||
fs_type = $FileSystemType
|
||||
raid_level = 0
|
||||
|
||||
[[[configuration cyclecloud.exports.shared]]]
|
||||
disabled = true
|
||||
|
||||
[[[configuration cyclecloud.exports.sched]]]
|
||||
disabled = true
|
||||
|
||||
[[[configuration cyclecloud.exports.nfs_data]]]
|
||||
type = nfs
|
||||
export_path = /mnt/exports/data
|
||||
|
||||
[[[cluster-init cyclecloud/nfs:default:1.0.0]]]
|
||||
|
||||
[[[input-endpoint ganglia]]]
|
||||
PrivatePort = 8652
|
||||
PublicPort = 8652
|
||||
|
||||
[[[network-interface eth0]]]
|
||||
AssociatePublicIpAddress = $UsePublicNetwork
|
||||
|
||||
|
||||
|
||||
|
||||
[parameters About]
|
||||
Order = 1
|
||||
|
||||
[[parameters About NFS]]
|
||||
|
||||
[[[parameter Filer]]]
|
||||
HideLabel = true
|
||||
Config.Plugin = pico.widget.HtmlTemplateWidget
|
||||
Config.Template := "<table><tr><td><img src='https://github.com/CycleCloudCommunity/nfs_filer/raw/master/icon.png' width='192' height='192'></td></tr><tr><td><p>Creates a basic, single-node NFS File Server exporting a configurable directory. This file server may be mounted by other clusters as a cluster-local, persistent, shared storage device.</p></td></tr></table>"
|
||||
|
||||
[[[parameter Readme]]]
|
||||
HideLabel = true
|
||||
Config.Plugin = pico.widget.HtmlTemplateWidget
|
||||
Config.Template := "Follow the instructions in the <a href=\"https://github.com/CycleCloudCommunity/nfs_filer/\" target=\"_blank\">README</a> for details on instructions on extending and configuring the Project for your environment."
|
||||
|
||||
|
||||
[parameters Required Settings]
|
||||
Order = 10
|
||||
|
||||
[[parameters Virtual Machines ]]
|
||||
Description = "The cluster, in this case, has two roles: the scheduler master-node with shared filer and the execute hosts. Configure which VM types to use based on the requirements of your application."
|
||||
Order = 20
|
||||
|
||||
|
||||
[[[parameter Region]]]
|
||||
Label = Region
|
||||
Description = Deployment Location
|
||||
ParameterType = Cloud.Region
|
||||
DefaultValue = westus2
|
||||
|
||||
[[[parameter MachineType]]]
|
||||
Label = NFS Machine Type
|
||||
Description = The machine type for the NFS Server host
|
||||
ParameterType = Cloud.MachineType
|
||||
DefaultValue = Standard_DS4_v2
|
||||
|
||||
|
||||
[[parameters Networking]]
|
||||
Order = 40
|
||||
|
||||
[[[parameter SubnetId]]]
|
||||
Label = Subnet ID
|
||||
Description = Subnet Resource Path (ResourceGroup/VirtualNetwork/Subnet)
|
||||
ParameterType = Azure.Subnet
|
||||
Required = True
|
||||
|
||||
|
||||
[parameters Advanced Settings]
|
||||
Order = 20
|
||||
|
||||
[[parameters Azure Settings]]
|
||||
Order = 10
|
||||
|
||||
[[[parameter Credentials]]]
|
||||
Description = The credentials for the cloud provider
|
||||
ParameterType = Cloud.Credentials
|
||||
|
||||
[[parameters Filesystem Configuration]]
|
||||
|
||||
[[[parameter FsConfigDesc]]]
|
||||
HideLabel = true
|
||||
Config.Plugin = pico.widget.HtmlTemplateWidget
|
||||
Config.Template = "Configure the Filesystem options."
|
||||
|
||||
[[[parameter FilesystemSize]]]
|
||||
Label = Size (GB)
|
||||
Description = The filesystem size
|
||||
DefaultValue = 100
|
||||
Config.Plugin = pico.form.NumberTextBox
|
||||
Config.MinValue = 10
|
||||
Config.MaxValue = 10240
|
||||
Config.IntegerOnly = true
|
||||
|
||||
[[[parameter FileSystemType]]]
|
||||
Label = Format
|
||||
DefaultValue = xfs
|
||||
Config.Plugin = pico.form.Dropdown
|
||||
[[[[list Config.Entries]]]]
|
||||
Name = xfs
|
||||
Label = xfs
|
||||
[[[[list Config.Entries]]]]
|
||||
Name = ext3
|
||||
Label = ext3
|
||||
[[[[list Config.Entries]]]]
|
||||
Name = ext4
|
||||
Label = ext4
|
||||
|
||||
[[[parameter FileSystemPersistence]]]
|
||||
Label = Filesystem Persistence
|
||||
DefaultValue = true
|
||||
Config.Plugin = pico.form.RadioButtonsControl
|
||||
[[[[list Config.Entries]]]]
|
||||
Name = false
|
||||
Label = Ephemeral
|
||||
[[[[list Config.Entries]]]]
|
||||
Name = true
|
||||
Label = Persistent
|
||||
|
||||
[[parameters Software]]
|
||||
Description = "Specify the scheduling software, and base OS installed on all nodes, and optionally the cluster-init and chef versions from your Locker."
|
||||
Order = 10
|
||||
|
||||
[[[parameter ImageName]]]
|
||||
Label = Base OS
|
||||
ParameterType = Cloud.Image
|
||||
Config.OS = linux
|
||||
DefaultValue = cycle.image.centos7
|
||||
|
||||
[[[parameter FileServerClusterInitSpecs]]]
|
||||
Label = FileServerClusterInitSpecs
|
||||
Description = Cluster init specs to apply to the file server
|
||||
ParameterType = Cloud.ClusterInitSpecs
|
||||
|
||||
|
||||
[[parameters Advanced Networking]]
|
||||
Description = Advanced networking settings
|
||||
|
||||
[[[parameter ReturnProxy]]]
|
||||
Label = Return Proxy
|
||||
DefaultValue = true
|
||||
ParameterType = Boolean
|
||||
Config.Label = Use SSH tunnel to connect to CycleCloud (required if direct access is blocked)
|
||||
|
||||
[[[parameter UsePublicNetwork]]]
|
||||
Label = Public IP
|
||||
DefaultValue = true
|
||||
ParameterType = Boolean
|
||||
Config.Label = Access master node from the Internet
|
||||
|
Загрузка…
Ссылка в новой задаче