{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "## Step 2 - Initialise the software repository" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "In this Hands-On, the application directory will be initialised as a Git repository and linked to a remote service for hosting a copy of it. This Hands-On relies on GitLab to host the remote software repository. " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Prerequisites\n", "\n", "* The <app-name> value,\n", "* The <app-url> value. It will be a Gitlab repository URL,\n", "* The <cloud-username> value.\n", "* An account on https://gitlab.com." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Procedure\n", "\n", "* Open a Terminal window and change directory into the one you created in [Step 1](step-1.ipynb):\n", "\n", "```console\n", "APP_NAME=\n", "cd /workspace/${APP_NAME}\n", "```" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "* Setup additional variables:\n", "\n", "```console\n", "export CLOUD_USERNAME=\n", "export NAME_SURNAME=\"\"\n", "export GITLAB_USERNAME=\"\"\n", "export GITLAB_EMAIL=\n", "export HOME=/home/${CLOUD_USERNAME}\n", "```" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "* Setup your Git configuration by typing:\n", "\n", "```console\n", "echo \"[user]\n", " email = ${GITLAB_EMAIL}\n", " name = ${NAME_SURNAME}\n", "\n", "[credential \\\"https://gitlab.com\\\"]\n", " username = ${GITLAB_EMAIL}\n", " \n", "[push]\n", " default = matching\n", "[credential]\n", " helper = cache --timeout=3600\" > ~/.gitconfig\n", "```" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "* Initialize the Git repository and perform the first commit on the master branch" ] }, { "cell_type": "markdown", "metadata": { "raw_mimetype": "text/restructuredtext" }, "source": [ "```console\n", "git init\n", "git add -A .\n", "git commit -m \"Initial commit\"\n", "```" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "* Setup the right sync between the local folder and the software repository:\n", "\n", "```console\n", "APP_URL=\n", "git remote add origin ${APP_URL}\n", "```" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "* Create the software repository branches and push them to GitLab:\n", "\n", "```console\n", "git branch develop\n", "git branch docker\n", "git checkout develop\n", "git push -u origin master develop docker\n", "```" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Next step\n", "The software repository is now configured properly. The next Step is [Step 3 - Stage-in the EO data](step-3.ipynb) where we retrieve locally a Sentinel-1 product." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "celltoolbar": "Raw Cell Format", "kernelspec": { "display_name": "Python 2", "language": "python", "name": "python2" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 2 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython2", "version": "2.7.12" } }, "nbformat": 4, "nbformat_minor": 2 }