C4A 3.6 updates/changes

This forum is for the discussions and support for the Chocolatey For Automate plugin. Inside you will find the Documentation Project forum that describes the operation of the plugin.
PL-MSTech
Posts: 47
Joined: Mon Jul 31, 2023 10:07 pm

C4A 3.6 updates/changes

Post by PL-MSTech »

So, In this progression of changes and updates, you have twice instructed us to drop tables.... I have made the assumption that most MSPs - as well as your instructions - relate to CLOUD-BASED Automate instances unless otherwise stated. However, you have not specified.... and I believe when we issued the commands to drop the tables for the previous update (to 3.5?), they were perhaps NOT dropped completely. We are using your SQL Query Analyzer, which seemed to have worked, but I am not confident that it is always showing "live" Automate DB information on the cloud instance... So... being clear - WE ARE CLOUD HOSTED... (1) can WE drop the tables ourselves, or must we have support do this for us? - and (2) if the 4 tables were not dropped properly last time, do we need to start all over? If so, please give us step-by-step instructions to ensure we are not creating new problems with old tables still in the db, as I have already spent upwards of 50 hours attempting to figure out what has not been working and why, as well as work through the issues and recommendations with you on the old versions to get where you are now with the current version. I know you have worked hard on this as well, and we all greatly appreciate it, but honestly, we expected when we subscribed two months ago, to install the plugin - then be up and running, rather than help you build a complete new version... furthermore, when we only get 1 reply per day (after hours)... the timeframe in getting our end operational is extended tenfold as opposed to being able to have some sort of semi-live support.

User avatar
Cubert
Posts: 2457
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Re: C4A 3.6 updates/changes

Post by Cubert »

I understand your frustrations.

I had been battling with this for several months, and each time I went to make a slim change in some thing to get it to conform to the new Chocolatey 2.2+ versions that was rolling out, i would get a report back that something else broke.

3.5 version of this plugin was an attempted remake of the 3.0 version which was based on Chocolatey pre 1.0. Both Chocolatey and our knowledge on how to avoid the 429 errors from community repo, which was one of the commanding factors in my descension to do a backend rewrite. You had also mention the groans from MSPGeek Slack about the control-ability of the automation deployed. We agreed with this assessment, this was that last poke we needed to push forward with a complete back end rewrite.

My goal is to make Chocolatey For Automate a tool that saves you time and energy and I obviously failed with you to do either, I apologize for this and promise that 3.6 experience is different. I have removed all the pre 1.0 chocolatey stuff, I removed 80% of the ISync Automation, I established a simple set of Groups to manage the automation and broke up the scripting in to smaller simpler blocks for easy trouble shooting and support. I also brought the Approved Application List down to the client level for more control over each client while still supporting a single list of applications globally.

These improvements will help prevent some of the growth issues we saw in 3.5 and puts the power of automation and control-ability directly in to your hands. With this control-ability the MSP can fine tune each group to operate best with in their environments.

I believe in the end the benefits will prove to be worth the sweat.

I understand response times seem slow, the reasons for this typically revolve me looking for and resolving a issue so that I have a solution for you when I comment, or at least solid questions to help me further the process. This post is a prime example of that process. At 9am this morning I got my first look at your current post. I started a response then quickly determined that for me to just push the fix for the hosted customers off to ConnectWise Support, would be considered cruel and unusual treatment in most of the civilized world.

Instead I would create a server function that could run as SYSTEM on the Automate Host that would have the permissions to DROP tables. I then had to build and test this fix before pushing it up for consumption. Here it is now Noon EST. I suspect you will see this in the next hour or so and respond and so pretty much a whole day is spent with only 1 post from me.

Hopefully its worth the extra time and solves every ones issue.

Here is what to do to get your self running

Download and Update the plugin to build -3.6.0.5 now available on site and pushing in next auto update.

Restart the DBagent and launch Control Center

Go to scripts and create a new Automate script (see Image Below). Inside script add a single line and find "Plugin Server Functions" and add it to the script. Inside the Plugin Server Functions is a Sub Function called "Clear Chocolatey Database Table". It will take no parameters and only needs to be executed once, select an available agent and execute script. Once agent says script completed "then" successfully you can proceed to restart the DBagent once again to force the tables to be recreated.

You should now have a operational plugin.



Screenshot 2023-10-17 113413.png
Screenshot 2023-10-17 113413.png (20.99 KiB) Viewed 17148 times


Let me know how it goes and if your table issue gets resolved.

PL-MSTech
Posts: 47
Joined: Mon Jul 31, 2023 10:07 pm

Re: C4A 3.6 updates/changes

Post by PL-MSTech »

Thank you for your reply and hard work... we will apply the fix and let you know the results.

User avatar
Cubert
Posts: 2457
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Re: C4A 3.6 updates/changes

Post by Cubert »

Just found a typo, Have a end If in the wrong row causing no tables to be created. Every change effects another.

I am running final test now, will post 3.6.0.6 up in 1 hour.

User avatar
Cubert
Posts: 2457
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Re: C4A 3.6 updates/changes

Post by Cubert »

Ok 3rd times a charm...
Build 3.6.0.6
Verified recreation should be solid.

PL-MSTech
Posts: 47
Joined: Mon Jul 31, 2023 10:07 pm

Re: C4A 3.6 updates/changes

Post by PL-MSTech »

We did as instructed and all is blank now... is this something that has to re-populate tonight?
17.10.2023_16.41.14_REC.png
17.10.2023_16.41.14_REC.png (61.29 KiB) Viewed 17129 times

User avatar
Cubert
Posts: 2457
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Re: C4A 3.6 updates/changes

Post by Cubert »

When deleting the tables you destroyed all data held in tables. You will now need to check the boxes to enable workstations and or servers. Then set one agent as cache manager.

If this is all you do it will see agents enabled and will test Chocolatey and scan for existing packages. The caching manager during its scans will also test repo versions for all approved packages in global list.

This will bring your data back.

Next open client view and select the approved apps button and approve any apps to auto install. Got to global view to add apps to list.

Next, by default updates happen daily, this may be more often than you desire. Select the schedule button to change to your needs.

You want auto install apps to agents? Check the box and approved client apps will be installed.

Client is now configured and will operate autonomously moving forward.

User avatar
Cubert
Posts: 2457
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Re: C4A 3.6 updates/changes

Post by Cubert »

Now why you don't have packages is a good question?

Let me look at that and make sure it's nothing on my side then I will help you get that back up without adding them back one at a time.

Give me 30 minutes

User avatar
Cubert
Posts: 2457
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Re: C4A 3.6 updates/changes

Post by Cubert »

Please verify that your DLL in plugin manager is in fact 3.6.0.6,

I reviewed our creation of tables and all is as it should be so lets look at your case.

You mentioned you have SQL access via Habitat, Lets run a few queries to see what we actually have available to us to see the state your actually in.

In Habitat SQL execute the following statements and report your results.


Returns list of applications from master list

Code: Select all

Select * from plugin_p4a_chocolatey_applications

Gets a list of all enabled agents

Code: Select all

SELECT * FROM labtech.plugin_p4a_chocolatey_enable

Test for table existance

Code: Select all

SHOW TABLES LIKE 'plugin_p4a_chocolatey_applications';
Should return table name


If these SQL queries failed then the tables are not available, manually restart the DBagent and allow it to complete the restart. Then retry queries.


If the above SQL queries did work (minus the first where no app list was returned) then the below SQL will repopulate your app list. But if table does not exist this query will also fail. Let me know if that happens.

Code: Select all

INSERT INTO `plugin_p4a_chocolatey_applications` VALUES ('7-zip','7zip.install',1 ,'None','',''),('Java 8','jre8',1 ,'None','',''),('Flash','flashplayeractivex',1 ,'None','',''),('Google Chrome','googlechrome',1 ,'None','',''),('Adobe Acrobat Reader MUI','adobereader',1 ,'None','',''),('Adobe Shockwave Player','adobeshockwaveplayer',1 ,'None','',''),('Audacity','audacity',1 ,'None','',''),('citrix receiver','citrix-receiver',1 ,'None','',''),('Dropbox','dropbox',1 ,'None','',''),('GoToMeeting','gotomeeting',1 ,'None','',''),('iCloud','icloud',1 ,'None','',''),('InkScape','inkscape',1 ,'None','',''),('Mozilla Firefox','firefox',1 ,'None','',''),('MySQL Workbench','mysql.workbench',1 ,'None','',''),('nmap','nmap',1 ,'None','',''),('notepad++','notepadplusplus.install',1 ,'None','',''),('Putty','putty.install',1 ,'None','',''),('WinSCP','winscp.install',1 ,'None','',''),('WinPcap','winpcap',1 ,'None','',''),('WinRar','winrar',1 ,'None','',''),('WireShark','wireshark',1 ,'None','',''),('Malwarebytes','malwarebytes',1 ,'None','',''),('Spotify','spotify',1 ,'None','',''),('bginfo','bginfo',1 ,'None','',''),('Skype','skype',1 ,'None','',''),('chocolatey-compatibility.extension','chocolatey-compatibility.extension',1 ,'None','',''),('chocolatey-core.extension','chocolatey-core.extension',1 ,'None','',''),('chocolatey-windowsupdate.extension','chocolatey-windowsupdate.extension',1 ,'None','',''),('chocolatey','chocolatey',1 ,'None','','');

User avatar
Cubert
Posts: 2457
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Re: C4A 3.6 updates/changes

Post by Cubert »

Just to confirm, I wiped clean all groups, searches, scripts, database tables, removed plugin, flushed out the DBagent so that all remints of the plugin were gone.

I loaded a fresh Control Center and added build 3.6.0.6 as a new plugin, enabled it and restarted the DBagent to complete install. The plugin loaded back up with everything intact and app list populated. I reconfigured client 1 as a new configuration, approving some apps, setting a weekly schedule, setting one agent to cache manager and now am watching the automation as the agents start traversing the groups via the auto join searches.

I will know here in next 24 hours if agents fully complete all tasks in front of them. Several tasks just have to past through as the agents have Chocolatey existing already. I'll let 24 hours on this client filter all the processes and verify we are completing expected jobs.


Screenshot 2023-10-18 093117.png
Screenshot 2023-10-18 093117.png (53.11 KiB) Viewed 17108 times

Post Reply

Return to “Chocolatey For Automate”