CCCTC Docs

CCCTC Docs

  • Help

Prerequisites for Local Development

Software You Will Need

SoftwareOperating SystemWebsite
IntelliJ IDEA*Allhttps://www.jetbrains.com/idea/
GitAllhttps://git-scm.com/downloads
MavenAllhttps://maven.apache.org/download.cgi
Java SE 8 JDKWindows/Machttps://www.java.com/en/download/
Java Cryptography Extensions (JCE)Windows/Machttp://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html
Open JDK 8Linuxhttp://openjdk.java.net/install/index.html
DockerWindowshttps://docs.docker.com/docker-for-windows/install/
DockerMachttps://docs.docker.com/docker-for-mac/install/
DockerLinuxhttps://docs.docker.com/install/

*Note: IntelliJ is recommended, but other IDE's would likely work. However, some of this documentation may have specific instructions for IntelliJ.

Set Up a Valid SSH Private Key

Follow the instructions here: Bitbucket ssh key setup.

This allows your local Docker container to clone the service-conductor-config repository at runtime.

  • When following the Bitbucket SSH Key setup instructions above, use the following parameters when you create your key in order to create a private key with a "BEGIN RSA" header instead of the unsupported "BEGIN OPENSSH" header:
ssh-keygen -m PEM
  • Be sure to add your generated public key in Bitbucket, in Settings -> SSH keys.
  • The public key must be associated with your CCCTC bitbucket account and the password must be blank (i.e. don't set one when prompted).

Tech Center Nexus Repository Configuration

You will need to configure your local copy of Maven to be able to access the Tech Center's Maven Repository.

Instructions are here: https://cccnext.jira.com/wiki/spaces/CE/pages/79921694/Nexus

Note: This may or may not be necessary for this project ... but is necessary for some other tech center projects

Tech Center Docker Registry Configuration

You will need to obtain credentials to login to the Tech Center's Docker registry to pull docker images.

Instructions are here: https://cccnext.jira.com/wiki/spaces/DEVOPS/pages/129302935/Private+Docker+Registry+Authenticating+new+users

Once you have obtained your credentials you may login like so:

docker login registry.ccctechcenter.org:5000

Once logged in your should be able to pull docker images from the tech center registry.

Additional steps for Windows Users

Many applications in the API Gateway stack make use of bash scripts and other linux-specific programs. There are several solutions to deal with this problem, here is one of them that uses the Windows Subsystem for Linux (WSL). This has the benefits of running linux alongside your Windows installation instead of a separate VM and it allows for the execution of most linux programs available. This makes its compatibility level very high with any shell script that is designed to run on linux.

Problems with Windows vs Unix Line Endings

Bash scripts will not work if they have Windows line endings. Make sure to turn off "autocrlf" in git to ensure that when you pull source code from BitBucket that it will not ruin the cr/lf endings of shell scripts and other linux files.

To turn off auto cr/lf run this command:

git config --global core.autocrlf false

Ubuntu - WSL

Download Ubuntu from the Microsoft Store. This makes use of the Windows Subsystem for Linux (WSL) and allows you to run nearly any Linux program.

https://www.microsoft.com/en-us/p/ubuntu/9nblggh4msv6

IMPORTANT Notes:

  1. Not every program will run under WSL.
  2. Docker will not run separately inside WSL. Instead it makes use of your Windows docker installation. Configuration can be performed with instructions such as these: https://nickjanetakis.com/blog/setting-up-docker-for-windows-and-wsl-to-work-flawlessly
  3. You will need to install all the tools you need to use in Ubuntu inside this Ubuntu console. You can do this in the normal fashion with apt-get and such. This includes tools such as git, maven, java, etc described at the top of this document.
  • Software You Will Need
  • Set Up a Valid SSH Private Key
  • Tech Center Nexus Repository Configuration
  • Tech Center Docker Registry Configuration
  • Additional steps for Windows Users