Skip to content
This repository has been archived by the owner on Jul 23, 2021. It is now read-only.

Set up a gridFTP server and add logging

conor-proud-tessella edited this page Oct 30, 2018 · 2 revisions

The gridFTP server and globus toolkit can be automatically installed by provisioning your Vagrant box. To do this, you need to create a new Ansible role. First, create a new folder called "gridftp" in the "dev-environment/roles/" directory and within the "gridftp" folder create a sub folder called "tasks" and within "tasks", create a file called "main.yml" containing the following code:

---
- name: Install globus libraries
  yum:
    name: "{{ packages }}"
    state: present
  become: true
  vars:
    packages:
    - globus-common
    - globus-common-devel
    - globus-ftp-client
    - globus-ftp-client-devel
    - globus-ftp-control
    - globus-ftp-control-devel
    - globus-gass-copy-progs
    - globus-gridftp-server
    - globus-gridftp-server-progs
    - globus-gridftp-server-devel

- name: Install myproxy
  yum:
    name: myproxy
    state: present
  become: true

This now completes the creation of a new Ansible role. To include this role in your build you need to now edit the yaml file located here:

gridftp_acl_plugin/dev-environment/gridftp-plugin-dev.yml

Under "roles", add - gridftp following the indentation pattern for the other roles already added.

Once this is done, start your vagrant boxes vagrant up

Which may need to be reprovisioned to make sure your file changes are implemented e.g. vagrant provision machine1

Then log in to your vagrant box vagrant ssh machine1

Once inside, you can check that your gridFTP server is installed and functions by running the following tests.

First, start your server in anonymous mode, using port 5000:

$globus-gridftp-server -control-interface 127.0.0.1 -aa -p 5000 &

Create a test file

$echo "test" > ~/test.txt

And use globus-url-copy to test the server is working:

$globus-url-copy -list file:///home/${USER}/

  • should list the files in the "user" directory"

$globus-url-copy -v file:///home/${USER}/test.txt ftp://localhost:5000/tmp/

  • should copy the test.txt file to the /tmp/ folder using the gridFTP server you have created

Logging

Logging can be added either from the command line by adding -d ALL, or by editing the grid ftp config file in /etc/gridftp.conf to include the following lines:

log_level INFO,TRANSFER
log_single /var/log/gridftp/gridftp-auth.log
log_transfer /var/log/gridftp/gridftp.log
log_module stdio:buffer=0:interval=1

$DEBUG 1