Configure iSCSI targets and initiator on GNU/Linux and FreeBSD.
Table of Contents
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
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
forctld(8)
on FreeBSD/etc/target/saveconfig.json` for ``LIO
on GNU/Linux/etc/targets.conf
fortgt(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
forOpen 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.
iscsi.target.package
iscsi.target.package.clean
iscsi.target.config
iscsi.target.config.clean
iscsi.target.kernel
iscsi.target.kernel.clean
iscsi.target.make
iscsi.target.make.clean
iscsi.target.service
iscsi.target.service.clean
iscsi.initiator.package
iscsi.initiator.package.clean
iscsi.initiator.config
iscsi.initiator.config.clean
iscsi.initiator.kernel
iscsi.initiator.kernel.clean
iscsi.initiator.make
iscsi.initiator.make.clean
iscsi.initiator.service
iscsi.initiator.service.clean
iscsi.isns.package
iscsi.isns.package.clean
iscsi.isns.config
iscsi.isns.config.clean
iscsi.isns.make
iscsi.isns.make.clean
iscsi.isns.service
iscsi.isns.service.clean
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
.
- 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
.
Creates the docker instance and runs the iscsi
main state, ready for testing.
Runs the inspec
tests on the actual instance.
Removes the docker instance.
Runs all of the stages above in one go: i.e. destroy
+ converge
+ verify
+ destroy
.
Gives you SSH access to the instance for manual testing.