saltstack-formulas / iscsi-formula

Manage iSCSI Target and Initiator via SaltStack (FreeBSD & GNU/Linux)

Home Page:http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

iscsi-formula

Travis CI Build Status Semantic Release

Configure iSCSI targets and initiator on GNU/Linux and FreeBSD.

See the full SaltStack Formulas installation and usage instructions.

If you are interested in writing or contributing to formulas, please pay attention to the Writing Formula Section.

If you want to use this formula, please pay attention to the FORMULA file and/or git tag, which contains the currently released version. This formula is versioned according to Semantic Versioning.

See Formula Versioning Section for more details.

The scope of this formula is Ethernet/Block

Link/Transport and Storage protocol infographic

Commit message formatting is significant!!

Please see How to contribute for more details.

Meta-state (This is a state that includes other states).

Deploy iSNS, iSCSI initiator, and iSCSI target packages, manage configuration files and then starts the associated iscsi services.

Install and configure the iSCSI Target service. Supported vendor implementations include-

  • /etc/ctl.conf for ctld(8) on FreeBSD
  • /etc/target/saveconfig.json` for ``LIO on GNU/Linux
  • /etc/targets.conf for tgt(8) on GNU/Linux
  • /etc/ietd.conf for ietd(8)` on GNU/Linux

The defaults targets are-

  • ctld on FreeBSD
  • LIO on CentOS, OpenSUSE, Arch
  • tgt on Debian
  • Unsupported on Amazon (no packages available)

The default choice is modifable via the iscsi.target.provider pillar value. New providers can be introduced via pull request.

Meta-state (This is a state that includes other states).

this state will undo everything performed in the iscsi.target meta-state in reverse order, i.e. stops the service, removes the configuration files and then uninstalls the package.

Install and configure the iSCSI initiator service-

  • /etc/iscsi.conf for FreeBSD
  • /etc/iscsi/iscsid.conf or ~/.iscsid.conf for Open iSCSI on GNU/Linux

Meta-state (This is a state that includes other states).

this state will undo everything performed in the iscsi.initiator meta-state in reverse order, i.e. stops the service, removes the configuration files and then uninstalls the package.

Install and configure iSCSI name service.

Meta-state (This is a state that includes other states).

this state will undo everything performed in the iscsi.isns meta-state in reverse order, i.e. stops the service, removes the configuration files and then uninstalls the package.

Install iSCSI target related packages.

Remove iSCSI target related packages.

Install iSCSI target related configuration files.

Remove iSCSI target related configuration files.

Load iSCSI target related kernel modules.

Unload iSCSI target related kernel modules.

Make iSCSI related packages from git source on FreeBSD.

Remove iSCSI related package binaries on FreeBSD.

Install iSCSI target services.

Stop and disable SCSI target services.

Install iSCSI initiator related packages.

Remove iSCSI initiator related packages.

Install iSCSI initiator related configuration files.

Remove iSCSI initiator related configuration files.

Load iSCSI initiator related kernel modules.

Unload iSCSI initiator related kernel modules.

Make iSCSI related packages from git source for FreeBSD.

Remove iSCSI related package binaries on FreeBSD.

Install iSCSI initiator services.

Stop and disable iSCSI initiator services.

Install iSCSI isns packages.

Remove iSCSI isns packages.

Customises iscsi isns configuration. Requires iscsi.isns.package via include list.

Remove iSCSI isns configuration files.

This state makes iscsi isns services on FreeBSD.

Removes iSCSI isns binaries on FreeBSD.

Start iscsi isns services. Requires iscsi.isns.config via include list.

Meta-state (This is a state that includes other states).

this state will undo everything performed in the iscsi.isns meta-state in reverse order, i.e. stops the service, removes the configuration files and then uninstalls the package.

Linux testing is done with kitchen-salt.

Requirements

  • Ruby
  • Docker
$ gem install bundler
$ bundle install
$ bin/kitchen test [platform]

Where [platform] is the platform name defined in kitchen.yml, e.g. debian-9-2019-2-py3.

bin/kitchen converge

Creates the docker instance and runs the iscsi main state, ready for testing.

bin/kitchen verify

Runs the inspec tests on the actual instance.

bin/kitchen destroy

Removes the docker instance.

bin/kitchen test

Runs all of the stages above in one go: i.e. destroy + converge + verify + destroy.

bin/kitchen login

Gives you SSH access to the instance for manual testing.

About

Manage iSCSI Target and Initiator via SaltStack (FreeBSD & GNU/Linux)

http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html

License:Other


Languages

Language:SaltStack 67.4%Language:Jinja 11.6%Language:Ruby 10.5%Language:JavaScript 8.1%Language:Shell 2.5%