948 Commits

Author SHA1 Message Date
Kris Moore
1f62042828 Add new relaunchd configuration files, but keep rc.d so both
can be used
2016-04-12 16:55:03 -04:00
Tim Moore II
81c4e91905 Content addition to connection.rst
-beginning to create content for the "getting started" section in connection.rst
-re-added events.rst to the index
-some json syntax corrections in connection.rst
2016-04-12 16:47:30 -04:00
Tim Moore II
224c7c8178 Additional dispatcher work
-updated dispatcher messaging to reflect current changes
-fixed some errors in formatting
-altered dispatcher sample responses in the necessary classes section to reflect a "finished" state.
2016-04-12 13:39:34 -04:00
Ken Moore
b257874672 Disable the rpc/syscache backend from the sysadm server. The new sysadm/pkg backend completely replaces it. 2016-04-12 07:38:52 -04:00
Ken Moore
ad26f68a76 Merge branch 'master' of github.com:pcbsd/sysadm 2016-04-11 10:41:10 -04:00
Ken Moore
f4c0bc632f (API CHANGE) Enhance the sysadm-pkg search functionality a bit:
1) Add a new optional argument to the pkg_search action: "search_excludes" (string or array of strings). This will exclude matches which contain a restricted string.
2) Add a new output field to the search results:
"pkg_search":{"results_order":[list of origins by priority], <other results/data> }
3) Adjust how the search is performed when the search term has multiple words. First look for any result which contains all the words, then if nothing is found look for any result which contains any of the words.
2016-04-11 10:34:28 -04:00
Dru Lavigne
74d28db8fa Merge pull request #13 from Mrt134/master
Events.rst work
2016-04-07 15:02:25 -04:00
Tim Moore II
e245ee9be4 Events.rst work
-Adding additional documentation of dispatcher subsystem and sample code blocks
2016-04-07 14:56:20 -04:00
Ken Moore
6cdf2c32ba Fix a bug with the new SQL database connections - the sub-queries needed the individual DB to use as well. 2016-04-05 14:37:03 -04:00
Ken Moore
b7273f7e19 Make sure that when starting updates via sysadm - it will remove the temporary/last update log file so the next check is forced to re-run. 2016-04-05 10:22:37 -04:00
Ken Moore
36b30e6c9c Finish cleaning up the new "pending" state for dispatcher processes. 2016-04-05 10:19:05 -04:00
Ken Moore
8ad8babafa Adjust the pkg search routine to also detect exact name matches. 2016-04-05 09:43:17 -04:00
Ken Moore
9409ef7908 Setup the dispatcher system to have "pending" processes send out regular pings about still being pending. 2016-04-05 09:38:39 -04:00
Ken Moore
d99e3443bd Merge branch 'master' of github.com:pcbsd/sysadm 2016-04-05 09:10:54 -04:00
Ken Moore
72e337f10b Fix up the SQL connection queue issues. Now it works a little faster and multiple threads accessing the same database will not cause crashes. 2016-04-05 09:10:04 -04:00
Dru Lavigne
f1fe85150e Merge pull request #12 from Mrt134/master
-Added tm to 'SysAdm'
2016-04-04 14:10:21 -04:00
Tim Moore II
b11281e2bc -Added tm to 'SysAdm' 2016-04-04 13:48:55 -04:00
Dru Lavigne
895821ad0e Merge pull request #11 from Mrt134/master
Content addition to the SysAdm server docs
2016-04-04 13:40:14 -04:00
Tim Moore II
185f064b34 Text addition to manage.rst
- added sysadm default config settings and the process to create custom configs to manage.rst
2016-04-04 13:34:52 -04:00
Tim Moore II
919457d54f Forgot to add the new files from the previous commit. 2016-04-04 13:11:32 -04:00
Tim Moore II
bfb99d34ce Content addition to the SysAdm server docs
-Added two new docs as chapters
-Bringing readme information over to .rst for downloading and building SysAdm
2016-04-04 13:06:12 -04:00
Ken Moore
89fbc1293c Merge branch 'master' of github.com:pcbsd/sysadm 2016-04-01 15:06:51 -04:00
Ken Moore
221b666262 Turn off some debugging, and switch the pkg database connection system over to a clone system so one request cannot interfere with another. 2016-04-01 15:06:10 -04:00
Dru Lavigne
070fa8578c Merge pull request #10 from Mrt134/master
A few error fixes
2016-03-31 15:14:35 -04:00
Tim Moore II
6cdd3d2cbf A few error fixes
- updated sysadm server documentation with correct title.
 - cleaned up a few json errors in dispatcher event reply messages.
2016-03-31 13:54:26 -04:00
Ken Moore
e5d8c33b81 Remove some comments from the pkg interface, and make sure the dispatcher sends out a full update when starting for the first time (in case the proc is a special subsystem process). 2016-03-31 10:09:37 -04:00
Ken Moore
341a546c4b Fix a bug in the new annotations streamline - now it gets added to the proper sub-object. 2016-03-31 08:19:28 -04:00
Ken Moore
23a688bd75 Also speed up the annotations pkg_info listing - now it only uses 2 queries total instead of 1+(2*<number of options>) queries. 2016-03-30 21:35:24 -04:00
Ken Moore
4abaac9b75 Merge branch 'master' of github.com:pcbsd/sysadm 2016-03-30 21:20:21 -04:00
Ken Moore
096fb2c5be Reduce the number of queries to get all the options for a pkg down to a single query (across a couple tables). 2016-03-30 21:19:36 -04:00
Dru Lavigne
44d1166023 Merge pull request #9 from Mrt134/master
Working on section 3 of PC-BSD API 1.0 documentation.
2016-03-30 09:17:44 -04:00
Ken Moore
08af33c778 Fix up the dispatcher queueing system (for real this time). Now the processes will properly get removed when they are finished, and the next process started up. 2016-03-29 20:21:43 -04:00
Tim Moore II
b7be4faa31 Merge branch 'master' of https://github.com/pcbsd/sysadm 2016-03-29 16:23:59 -04:00
Tim Moore II
9a371de28d Working on section 3 of PC-BSD API 1.0 documentation.
Added subsections to section 3: dispatcher, life preserver, and system state.
Added examples of dispatcher messaging to parts of section 4: Classes.
Added further examples of messaging to section 3 in the subsections.
2016-03-29 16:17:26 -04:00
dlavigne
f66656675b Remove placeholders for now as they can be readded as calls are created. 2016-03-29 10:21:18 -04:00
dlavigne
6705c0b70c Remove redundancy. Events will now be described in each section, as required. 2016-03-29 10:06:52 -04:00
dlavigne
842a594ce3 Doc extra arguments to pkg_info. 2016-03-28 14:08:53 -04:00
dlavigne
d68499f0e4 Doc pkg_remove action. 2016-03-28 13:25:40 -04:00
dlavigne
89bf8df311 Doc pkg_install action. 2016-03-28 13:04:50 -04:00
dlavigne
f72f2db240 doc pkg_lock and pkg_unlock actions. 2016-03-28 12:51:22 -04:00
dlavigne
6e046d5782 Doc pkg_update action. 2016-03-28 12:40:37 -04:00
dlavigne
069e0467a4 Doc pkg_check_upgrade action. 2016-03-28 12:28:51 -04:00
Ken Moore
b7471bf44e Fix a threading issue in the dispatcher which was preventing queued processes from getting started. 2016-03-28 12:20:01 -04:00
Ken Moore
033bea2e7b Add a new API call: sysadm/pkg, "action"="pkg_remove".
This will remove the given packages from the system.
Required arguments:
"pkg_origins" = (single origin string or array of origin strings).
Optional arguments:
"recursive" = "true" or "false" (default: "true"). If true, other packages which depend on this package will also be removed (no broken dependencies).
NOTE: The actual information will be returned as a Dispatcher event - this API call just queues up the pkg operation (limitation of pkg - only one process call at a time)

REST Request:
-------------------------------
PUT /sysadm/pkg
{
   "recursive" : "false",
   "action" : "pkg_remove",
   "pkg_origins" : "games/angband"
}

WebSocket Request:
-------------------------------
{
   "id" : "fooid",
   "name" : "pkg",
   "namespace" : "sysadm",
   "args" : {
      "action" : "pkg_remove",
      "recursive" : "false",
      "pkg_origins" : "games/angband"
   }
}

Response:
-------------------------------
{
  "args": {
    "pkg_remove": {
      "proc_cmd": "pkg delete -y games/angband",
      "proc_id": "sysadm_pkg_remove-{2aa844aa-f6a8-4e8f-ae71-b56af735ccb8}",
      "status": "pending"
    }
  },
  "id": "fooid",
  "name": "response",
  "namespace": "sysadm"
}
2016-03-28 11:59:42 -04:00
Ken Moore
9a0ac8e403 Merge branch 'master' of github.com:pcbsd/sysadm 2016-03-28 11:53:11 -04:00
Ken Moore
ab0ce827cf Add a new API call: sysadm/pkg, "action"="pkg_install".
This will install the given packages on the system.
Required arguments:
"pkg_origins" = (single origin string or array of origin strings).
Optional arguments:
"repo": Name of the remote repository to use (if not supplied, pkg will automatically determine repository).
NOTE: The actual information will be returned as a Dispatcher event - this API call just queues up the pkg operation (limitation of pkg - only one process call at a time)

REST Request:
-------------------------------
PUT /sysadm/pkg
{
   "pkg_origins" : "games/angband",
   "action" : "pkg_install",
   "repo" : "pcbsd-major"
}

WebSocket Request:
-------------------------------
{
   "name" : "pkg",
   "namespace" : "sysadm",
   "id" : "fooid",
   "args" : {
      "action" : "pkg_install",
      "pkg_origins" : "games/angband",
      "repo" : "pcbsd-major"
   }
}

Response:
-------------------------------
{
  "args": {
    "pkg_install": {
      "proc_cmd": "pkg install -y --repository \"pcbsd-major\" games/angband",
      "proc_id": "sysadm_pkg_install-{ae444472-47df-4a65-91eb-013cc82ce4ad}",
      "status": "pending"
    }
  },
  "id": "fooid",
  "name": "response",
  "namespace": "sysadm"
}
2016-03-28 11:50:31 -04:00
dlavigne
dd19b3cf88 Doc pkg_upgrade action. 2016-03-28 11:47:58 -04:00
dlavigne
7aa65f4d22 Doc the pkg_audit action. 2016-03-28 11:40:38 -04:00
Ken Moore
31593708bf Merge branch 'master' of github.com:pcbsd/sysadm 2016-03-28 11:33:39 -04:00
Ken Moore
d00ccb071c Add 2 new API calls: sysadm/pkg, "action"="pkg_[un]lock".
This will [un]lock the given packages on the system.
Required argument: "pkg_origins" = (single origin string or array of origin strings).
NOTE: The actual information will be returned as a Dispatcher event - this API call just queues up the pkg operation (limitation of pkg - only one process call at a time)

REST Request:
-------------------------------
PUT /sysadm/pkg
{
   "pkg_origins" : [
      "misc/pcbsd-base"
   ],
   "action" : "pkg_lock"
}

WebSocket Request:
-------------------------------
{
   "namespace" : "sysadm",
   "id" : "fooid",
   "name" : "pkg",
   "args" : {
      "pkg_origins" : [
         "misc/pcbsd-base"
      ],
      "action" : "pkg_lock"
   }
}

Response:
-------------------------------
{
  "args": {
    "pkg_lock": {
      "proc_cmd": "pkg lock -y misc/pcbsd-base",
      "proc_id": "sysadm_pkg_lock-{352f7f66-d036-4c16-8978-67950957bf22}",
      "status": "pending"
    }
  },
  "id": "fooid",
  "name": "response",
  "namespace": "sysadm"
}

REST Request:
-------------------------------
PUT /sysadm/pkg
{
   "action" : "pkg_unlock",
   "pkg_origins" : "misc/pcbsd-base"
}

WebSocket Request:
-------------------------------
{
   "id" : "fooid",
   "args" : {
      "action" : "pkg_unlock",
      "pkg_origins" : "misc/pcbsd-base"
   },
   "name" : "pkg",
   "namespace" : "sysadm"
}

Response:
-------------------------------
{
  "args": {
    "pkg_unlock": {
      "proc_cmd": "pkg unlock -y misc/pcbsd-base",
      "proc_id": "sysadm_pkg_unlock-{d1771b41-c1ca-480a-a3ce-42d4eddbfae8}",
      "status": "pending"
    }
  },
  "id": "fooid",
  "name": "response",
  "namespace": "sysadm"
}
2016-03-28 11:30:46 -04:00