Build a New Nextcloud Server with Attune, Fast!

Nextcloud Server Setup with Attune

Nextcloud is one of the most deployed on-premises platforms for file sharing and collaboration. Setting up the Nextcloud server is not very complex but still requires a few steps. With Attune Nextcloud server setup is easier than ever. Attune is a very simple and powerful server automation tool that uses bash, Powershell, or python scripts.

Let’s get started, and see an overview of Nextcloud server installation with Attune.

First of all, log in to Attune.

Login to Attune
Login Screen

You will see a fresh Attune server with nothing on it. Attune centralizes all of your archives, cloud automation, and automation steps in a single server.

Fresh Attune Server
Fresh Attune Server

Import Procedures

We have a Nextcloud Attune procedure that contains archive and automation steps. Let’s import into Attune and see what happens.

Attune procedure import screen
Attune procedure import screen

You will see an Attune procedure import preview screen, it allows you to view the steps that have changed before you import them into attune. List of automation steps, archives, variables, and list of some values to make things easier for running new plans.

Attune procedure import preview screen
Attune procedure import preview screen

Once you have imported the procedure into Attune, you will be able to look at the data that has been brought into the Attune under the Procedure tab.

Loaded Data in Attune
Loaded Data in Attune

As you can see in the screenshot, there will be a list of procedures that will perform different operations. There is a main procedure “Build NextCloud Server CentOSB-PRL“ under which there are multiple different procedures. The one group of steps under this procedure will create a new central virtual machine from scratch. The next three procedures will build an ISO specifically for this machine that contains an automated installer, kickstart for CentOS. To do this, attune uses different kickstart variables from this template and deploys this kickstart for directory ISO again.

Edit File in Archive
Edit File in Archive

Steps under the KS Parallel Recreate Virtual Machine procedure would connect to a virtual platform and creates a new virtual machine from scratch telling it to boot to ISO just generated in the previous step.

Execute Ssh Command Step
Execute Ssh Command Step

Once CentOS install itself and arrives on the network you can see it and start running new scripts against it. Steps under KS PRL Setup NextCloud Disks would add 2 extra disks to the next cloud server, giving it the space it needs for your fall storage.

Then you will see, Nextcloud server build procedure steps. This group of steps is linked to the end of the procedure. These automation steps will install EPEL release packages, PHP and SE Linux, etc.

Nextcloud server build procedure steps
Nextcloud server build procedure steps

Update Variables

Now, look at the variables that came in with the procedure import. A variable is just a name with the type. These variables can be used throughout Attune including in scripts.

Edit Variable
Edit Variable

Values

Now look at the values, procedure imports don’t contain any passwords so you will need to set up passwords during Attune Nextcloud server setup. You will note that different values are mapped to the variable by the plan. Values contain the details that are awarded to the scripts when they run.

Edit Variable
Edit Variable

Plans

We need to create a Plan, this Plan will map all the variables to the values of the specific Nextcloud server we wanna build. The default values are already set for the server we just need to fill out some custom values for this server, such as the server group and the target server. If you want to create 2 Nextcloud servers, create another plan with a different target server.

Edit Plan
Edit Plan

Jobs

Now Just create a new job to run the plan we have just created in the above step. When you will click Run you will see some progress bars. A job contains every step the procedure contains, and captures logs against each step.

Jobs
Jobs

At this point attune is waiting for CentOS to finish installing itself and appear on the network with SSH enabled. All the automation steps you are will see on-screen during CentOS installation were configured by hand using attune web app user interface.

Your team would have undoubtedly a lot of scripts to perform their tasks. This can be done easily in most cases copied and pasted into Attune automation steps. This will also ensure that knowledge for your scripts will be centralized and viewable and useable by every team member. This includes any files and archives needed throughout the automation.

Powershell and bash both have flags that you can set, that will cause the script to exit if any of the commands fail.

We have a planned failure example for you, Attune will stop if any scripts return with a failure exit code. You can see the exit code and error log.

Error Log
Error Log

There is a powerful feature in Attune, when the procedure is started and halfway through you can fix the error in the scripts. Then just rerun this one step and watch it complete successfully. Once this step is completed, you can run the procedure from there onwards, saving time to rebuild the server from scratch and run the whole procedure from the beginning.

This is a very powerful feature allowing rapid development of automation. This in turn allows projects to immediately realize the benefits of Attune.

The fully automated Nextcloud server automation procedure is complete. Now let’s log in to Nextcloud.

NextCloud Login
NextCloud Login

Wasn’t that simple? That’s all you need to do for the Nextcloud server setup using Attune.

Comments

Join the discussion!