ilx workspaceΒΆ

ilx workspace(1)				  BIG-IP TMSH Manual				     ilx workspace(1)

NAME
       workspace - Configures a development workspace for Node.js(tm) iRule Language Extensions.

MODULE
       ilx

SYNTAX
       Configure the workspace component within the ilx module using the syntax shown in the following sections.

   CREATE/MODIFY/EDIT
	create workspace [name]
	 options:
	   archive [name]
	   extension [name]
	   file [name]
	   from-archive [name]
	   from-plugin [name]
	   from-uri [uri]
	   from-workspace [name]
	   node-version [version]
	   rule [name]

	modify workspace [name]
	 options:
	   from-archive [name]
	   from-plugin [name]
	   from-uri [uri]
	   from-workspace [name]
	   node-version [version]

	edit workspace [name]
	 options:
	   extension [name]
	   file [name]
	   rule [name]

   DISPLAY
	list workspace
	list workspace [ [name] ... ]
	show running-config workspace
	show running-config workspace [ [name] ... ]
	 options:
	   all-files
	   all-properties
	   archive [name]
	   extension [name]
	   file [name]
	   node-version
	   one-line
	   partition
	   recursive
	   rule [name]
	   staged-directory
	   version

	show workspace
	show workspace [name]
	 options:
	   all-properties
	   detail
	   field-fmt

   DELETE
	delete workspace [name]
	 options:
	  archive [name]
	  extension [name]
	  file [name]
	  rule [name]

DESCRIPTION
       An ILX Workspace is an area of the file system used to store Node.js(tm) and supporting files used to
       construct an ilx plugin. Workspaces are stored in /var/ilx/workspaces/...//.

       A workspace contains several components.
	  /var/ilx/workspaces/Common//extensions/...
	  /var/ilx/workspaces/Common//rules/...
	  /var/ilx/workspaces/Common//version

       The extensions directory contains sub-directories. Each sub-directory contains files for a specific extension.
	  /var/ilx/workspaces/Common//extensions//...  Each extension directory must
       contain a package.json file. This is a standard npm package definition file. For more information see
       www.npmjs.org/doc/package.json.html.  When an ilx plugin is started node will look in package.json for a main
       field that identifies the main entry point of the plugin. If the main field is not present node will look for
       the file index.js.

       The rules directory contains zero or more files that contain iRules (see ltm rule).
	  /var/ilx/workspaces/Common//rules/.tcl.  ILX iRule commands are used to
       communicate with a Node.js(tm) process that is running as part of an ILX Plugin.  When a new rule is created
       using either of the following commands a sample iRule file is opened with syntax examples for the ILX iRule
       commands.
	  create ilx workspace ilx rule test
	  edit ilx workspace ilx rule test

       When a new extension is created using the following commands a sample index.js file will be created that
       contains Node.js(tm) and ILX iRule examples. The extension directory is also populated with the file
       package.json and locally installed Node.js(tm) modules.
	  tmsh create ilx workspace my_workspace
	  tmsh create ilx workspace my_workspace extension my_extension

       The version file indicates the BIG-IP version used to create the workspace.

EXAMPLES
       create workspace my_workspace

       Creates a workspace named my_workspace in /var/ilx/workspaces/Common/my_workspace (assuming your current
       working folder is the default BIG-IP folder /Common).

       create workspace my_workspace rule my_rule

       Adds the iRule my_rule as the file my_rule.tcl to the workspace directory named
       /var/ilx/workspaces/Common/my_workspace/rules/.

       edit workspace my_workspace rule my_rule

       Adds or modifies the iRule my_rule as the file my_rule.tcl to the workspace directory named
       /var/ilx/workspaces/Common/my_workspace/rules/.

       create workspace my_workspace extension my_extension

       Adds a new extension directory in /var/ilx/workspaces/Common/my_workspace/extensions/my_extension and installs
       node_modules/f5-nodejs within the directory. my_extension must be a valid Linux directory name.

       edit workspace my_workspace extension my_extension

       If the extension does not exist a new extension directory is created in
       /var/ilx/workspaces/Common/my_workspace/extensions/my_extension, installs node_modules/f5-nodejs within the
       directory and opens the editor on the file within the directory named index.js.	If the extension already
       exists the editor will open index.js.

       edit workspace my_workspace file extensions/my_extension/my_file.js

       If the extension does not exist a new extension directory is created in
       /var/ilx/workspaces/Common/my_workspace/extensions/my_extension, installs node_modules/f5-nodejs within the
       directory and opens the editor on my_file.js.  If the extension already exists the editor will open
       my_file.js.

       edit workspace my_workspace file extensions/my_extension/my_file.js

       The editor is opened on /var/ilx/workspaces/Common/my_workspace/extensions/my_extension/my_file.js.  The
       extension must already exist.

       delete workspace my_workspace

       Deletes the workspace named my_workspace. This removes all disk files associated with the workspace and cannot
       be undone. You will be prompted to confirm before the workspace is deleted.

       delete workspace my_workspace extension my_extension

       Deletes the extension named my_extension in my_workspace.

       delete workspace my_workspace rule my_rule

       Deletes the iRule file named my_rule in my_extension in my_workspace.

       delete workspace my_workspace file extensions/my_extension/my_file

       Deletes the file named my_file in my_extension in my_workspace.

       list workspace my_workspace

       List the content of my_workspace

       list workspace recursive my_workspace

       List all files and directories in my_workspace.

       list workspace my_workspace rule

       List the rules associated with my_workspace.

       list workspace my_workspace rule my_rule

       List the text content of the rule my_rule associated with my_workspace

       list workspace my_workspace file rules/my_rule.tcl

       List the text content of the file rules/my_rule.tcl associated with my_workspace

       list workspace my_workspace extension

       List the extensions associated with my_workspace.

       list workspace my_workspace extension my_extension

       List the content of the my_extension extension directory associated with my_workspace.

       list workspace my_workspace file extensions/my_extension/my_file

       List the text content of the file my_file in extension my_extension.

       show workspace my_workspace

       Show the top level files for the specified workspace. Show the group, last modify time, owner, permissions and
       size of the workspace.

       show workspace

       Show all workspaces.

OPTIONS
       archive
	    Specifies the name of a workspace archive file. See the section below on archives.

       all-files
	    Recursively list all directory and file names contained in a workspace.

       all-properties
	    For a show command, show group, last modify time, owner, permissions, type and size of the
	    file/directory.

       detail
	    For a show command, show all the files in the workspace.

       extension
	    Specifies the name of a workspace extension.

       file For the edit and list commands the file option specifies the name of a file in a workspace to edit or
	    list. For the delete command the file option specifies the name of a workspace file to delete.

       from-archive
	    Specifies the name of a tar or gzipped tar archive file from which to create or update a workspace.  See
	    the section below on archives.

       from-plugin
	    Specifies the name of an ilx plugin from which to create or modify a workspace. The files used to create
	    the plugin are copied into the workspace.

       from-uri
	    Specifies the name of a URI from which to create or update a workspace. The URI must refer to a tar or
	    gzipped tar archive file.

       from-workspace
	    Specifies the name of a workspace from which to create or modify a workspace. The files used to create
	    the workspace specified by from-workspace are copied into the new workspace.

       node-version
	    Specifies the version of Node.js that will be used to run an . When an  is
	    created or updated from a workspace the plugin inherits the node-version from the workspace.  The node-
	    version may be specified when an ilx workspace is created. The node-version may also be changed after the
	    ilx workspace has been created.

	    When the node-version of a workspace is changed the workspace is archived. The following files and
	    directories are replaced: The file

	    [workspace name]/extensions/[extension name]/node_modules/f5-nodejs/package.json

	    and the content of the directory

	    [workspace name]/extensions/[extension name]/node_modules/f5-nodejs/lib.

	    To update an existing ilx plugin to use the new workspace version issue the following command:

	    modify ilx plugin [plugin name] from-workspace [workspace name]

	    When a node process is started the BigIP sets the NODE_PATH environment variable. For Node.js version
	    0.12 plugins the NODE_PATH is set to /usr/local/node/v0.12/lib/node_modules. For Node.js version 6 the
	    NODE_PATH is set to /usr/lib/node_modules:/usr/local/node/v6/lib/node_modules.

       one-line
	    List the content of a workspace on a single line.

       recursive
	    Recursively list all workspaces contained in the current BIG-IP system folder (see sys folder).

       rule Specifies the name of a rule file to create, delete, edit or list.

       staged-directory
	    The directory where the workspace and associated files reside. This is a read-only property.

       name Specifies the name of a workspace. This option is required for the commands create, delete, edit and
	    modify.

ACCESS CONTROL
       Workspaces are stored under file system directory /var/ilx/workspaces.

       A user with the role of admin can access all workspaces under /var/ilx/workspaces.

       Users with the role of irule-manager, manager and resource-admin can manage workspaces under
       /var/ilx/workspaces/, where  is the name of an existing sys folder that the
       user has permission to access, see also help sys folder and help pwd.

       As a convenience workspaces are automatically created in the users' current folder relative to
       /var/ilx/workspaces. However, workspaces may be created in file system directories that do not correspond to
       BIG-IP system configuration folders. In this case the workspace must be referred to by full path.

       The following creates two workspaces, the first in the file system location
       /var/ilx/workspaces/Common/my_workspace and the second in the filesystem location
       /var/ilx/workspaces/Common/my_folder/my_workspace.
	  (tmos)# pwd
	  /Common
	  (tmos)# create ilx workspace my_workspace
	  (tmos)# cd my_folder
	  (tmos)# pwd
	  /Common/my_folder
	  (tmos)# create ilx workspace my_workspace_2
	  (tmos)# list ilx workspace my_workspace_2
		      
	  (tmos)# cd ..
	  (tmos)# pwd
	  /Common
	  (tmos)# list ilx workspace my_workspace
		      

	  Full folder paths may be used to refer to a workspace.

	  (tmos)# create ilx workspace /Common/my_folder/my_workspace_2
	  (tmos)# list ilx workspace /Common/my_folder/my_workspace_2
		      

       If an auth partition is removed from the BIG-IP configuration the workspace files remain on disk and can be
       accessed by a user with the role of admin. If a sys folder is removed under an auth partition, such as
       removing the folder /Common/my_config, all workspaces under the file system directory
       /var/ilx/workspaces/Common/my_config remain accessible to all users that have access to the Common partition.

ARCHIVES
       A workspace archive is a gzipped tar file of an existing workspace. The archive contains all files in the
       workspace.

       There are two ways to refer to an archive: 1)  2) //.

       Workspace archives are stored in /var/ilx/workspaces//archive/.  The system
       looks for archives in /var/ilx/workspaces//archive.

       If an auth partition is removed from the BIG-IP configuration, archive files remain on disk and can be
       accessed by a user with the role of admin. A user with the role of admin can also manage archives under
       /var/ilx/workspaces in directories that do not correspond to a BIG-IP auth partition.

       create workspace my_workspace archive my_workspace.tgz

       Save the workspace as a gzipped tar file. The workspace must have been previously created.

       create workspace my_workspace archive /my_partition/my_workspace.tgz

       Save the workspace as a gzipped tar file to the set of archives in /my_partition.  The workspace must have
       been previously created.

       list workspace my_workspace archive

       List all archives in the current auth partition.

       list workspace my_workspace archive my_workspace.tgz

       List file details for the archive my_workspace.tgz.

       list workspace my_workspace archive /my_partition/my_workspace.tgz

       List file details for the archive my_workspace.tgz that is in my_partition.

       list workspace my_workspace archive /my_partition

       List all archives in /my_partition.

       delete workspace archive my_archive.tgz

       Delete the workspace archive my_archive.tgz.

       delete workspace archive /my_partition/my_archive.tgz

       Delete the workspace archive my_archive.tgz in /my_partition.

       create workspace my_workspace from-archive my_workspace.tgz

       Create a new workspace from the archive my_workspace.tgz.

       modify workspace my_workspace from-archive my_workspace.tgz

       Update  my_workspace from the archive my_workspace.tgz.

CONFIGURATION FILES
       Workspaces are not stored in system config files.

       Workspaces are stored in UCS files and are rolled forward to the next product release.

       In a bladed system workspaces are clustered among blades.

       Workspaces are not synced across device groups.

SEE ALSO
       auth partition, cm device-group, create, delete, edit, ilx plugin, list, modify, pwd, sys folder, tmsh

COPYRIGHT
       No part of this program may be reproduced or transmitted in any form or by any means, electronic or
       mechanical, including photocopying, recording, or information storage and retrieval systems, for any purpose
       other than the purchaser's personal use, without the express written permission of F5 Networks, Inc.

       F5 Networks and BIG-IP (c) Copyright 2008-2015. All rights reserved.

BIG-IP						      2017-05-09				     ilx workspace(1)