Table of Contents

Subscribe

Table of Contents

How to Use S2C Tool: A Step-by-Step Guide

This is a follow up post to our previous article ‘Migrating Solr to Amazon CloudSearch using the S2C tool’. Last month, we released an open source tool ‘S2C’, a Linux console based utility that helps developers to migrate search index from Apache Solr to Amazon CloudSearch.

In this article, we share the source code of the S2C tool which will allow developers to customize and extend the S2C tool to suit their requirements. The source code can be downloaded in the below link.

Further, we discuss step-by-step instructions on how to build the source code of S2C tool.

Pre-Requisites

In this section, we detail the pre-requisites for building S2C tool process.

  • The application is developed using Java. Download and Install Java 8 .Validate the JDK path and ensure the environment variables like JAVA_HOME, classpath, path is set correctly.
  • We will use Gradle to build the S2C tool. Download and Install Gradle.
    Please read getting-started.html (inside Gradle base folder) in setting up Gradle. Gradle is an open source build tool which does not require any pre-requisites like Maven or Ant.
  • Download and install Git – http://git-scm.com/book/en/v2/Getting-Started-Installing-Git and then use the following command to clone the source from Gitgit clone https://github.com/8KMiles/s2c/.git (requires Git installation)Note: The source code is available in public and does not require any credentials to access the source.

Build process

We will use Gradle, an open source build tool to build the S2C migration utility.

  • Verify the path, classpath, environment variables of Java, Gradle. Example: JAVA_HOME, GRADLE_HOME
  • Unzip the downloaded S2C source code and run the following command from the main directory. Example: E:/s2ctool/s2c-master or /opt/s2ctool/s2c-master

./gradlew -PexportPath=/tmp :s2c-cli:exportTarGz
The above command will create .tgz (zip file) at ‘/tmp’ directory. The directory path can be changed if required
or
gradle exportTarGz
The above command will create .tgz at ‘s2c-master/s2c-cli/tmp’ directory.
or
gradle exportZip
The above command will create .zip at ‘s2c-master/s2c-cli/tmp’ directory.
Build output file:s2c-cli-1.0.zip or s2c-cli-1.0.tgz

  • The build output is the final product that is deployed to do migration from Solr to Amazon CloudSearch. The deployment steps are discussed in detail in the original blog ‘Migrating Solr to Amazon CloudSearch using the S2C tool’.
  • Please do write your feedback and suggestions in the below comments section to improve this tool. We also intend to write a follow-up post sharing the original source code of this tool.

    About the Authors

    Dhamodharan P is a Senior Cloud Architect at SecureKloud.
    Dwarakanath R is a Principal Architect at SecureKloud.

Joe Arputhan

Joe Arputhan

Writer, researcher, content marketing evangelist, cloud and blockchain enthusiast.

Recent Blogs