diff --git a/.nojekyll b/.nojekyll index 83f15ed..67b3667 100644 --- a/.nojekyll +++ b/.nojekyll @@ -1 +1 @@ -4f688e59 \ No newline at end of file +a32e0a68 \ No newline at end of file diff --git a/ACEP-Data-Catalog-User-Guides.pdf b/ACEP-Data-Catalog-User-Guides.pdf index db79093..c67913b 100644 Binary files a/ACEP-Data-Catalog-User-Guides.pdf and b/ACEP-Data-Catalog-User-Guides.pdf differ diff --git a/documentation.html b/documentation.html index 1bc01a7..8726217 100644 --- a/documentation.html +++ b/documentation.html @@ -271,7 +271,8 @@

Creating a Local
  • tar -jxvf app_[date].tar.bz2
  • tar -jxvf app_storage_[date].tar.bz2
  • -

    This should result in the directory structure specified in ckan-src/README.txt

    +

    Decompressing the app_storage tar file should create a folder called ckan containing the folders resources, storage, and webassets. Rename the ckan folder to storage.
    +This should result in the directory structure specified in ckan-src/README.txt

  • Create a backups folder alongside the acepportal-ckan repository on your machine. Specify the name in the BACKUP_TO setting in the .env file.

    # Backups 
     BACKUP_TO=../../[backups folder name]
  • diff --git a/search.json b/search.json index e4d64fa..a8b67a0 100644 --- a/search.json +++ b/search.json @@ -164,7 +164,7 @@ "href": "documentation.html#developing-the-data-catalog", "title": "For Developers", "section": "", - "text": "Basic Docker Commands\nList all running containers:\ndocker ps -a There are 5 containers that run the data catalog\n- `acep-ckan-cont`\n- `acep-db-cont`\n- `acep-redis-cont`\n- `acep-solr-cont`\n- `acep-datapusher-cont`\nRebuild and spin up containers:\ndocker compose up -d --build\nGo into container:\ndocker exec -it [container_nane] /bin/bash\nOr if bash is not installed in the container:\ndocker exec -it [container_nane] /bin/sh\nOr if in a bash terminal:\ndocker exec -it [container_nane] bash\nRestart a container:\ndocker restart [container_name]\n\n\nCreating a Local Instance\nCreating a local version of the data catalog is a useful tool for developing and testing new features.\n\nInstall Docker: https://www.docker.com/get-started/\n\nClone the ACEP CKAN repository from Github: https://github.com/UAF-RCS/acepportal-ckan.git\nCreate the .env file inside the main acepportal-ckan folder. Copy the contents from the .env.example file.\nSpecify the location of the source files, storage files, backups, etc. in the .env file. You will move those files to these locations in the next steps. For example:\n# CKAN Mounts Directory\nCKAN_EXTENSIONS_MOUNT=./ckan-extension\nSRC_EXTENSIONS_PATH=/srv/app/src_extensions\nCKAN_SOURCE_MOUNT=./ckan-src/src\nCKAN_STORAGE_MOUNT=./ckan-src/storage\nCKAN_INI_MOUNT=./ckan-src/ckan.ini\nTo create a replica of the current main Data Catalog, copy over the source files, storage files, ckan.ini file, and database backups from the VM. These files are located on the VM inside /opt/ckan/backups. Use scp to copy the files onto your machine. These backups are created everyday: replace [date] with the most recent date in the format yyyymmdd.\nInside of acepportal-ckan/ckan-src run the following\n\nscp user@portal.lab.acep.uaf.edu:/opt/ckan/backups/app_[date].tar.bz2 .\n\nscp user@portal.lab.acep.uaf.edu:/opt/ckan/backups/app_storage_[date].tar.bz2 .\nscp user@portal.lab.acep.uaf.edu:/opt/ckan/acepportal-ckan/ckan-src/ckan.ini\n\nUse tar to decompress the source and storage tar files\n\ntar -jxvf app_[date].tar.bz2\ntar -jxvf app_storage_[date].tar.bz2\n\nThis should result in the directory structure specified in ckan-src/README.txt\nCreate a backups folder alongside the acepportal-ckan repository on your machine. Specify the name in the BACKUP_TO setting in the .env file.\n# Backups \nBACKUP_TO=../../[backups folder name]\nRun the following commands inside the backups folder to copy over the database and datastore.\n\nscp user@portal.lab.acep.uaf.edu:/opt/ckan/backups/ckandb_[date].tar .\nscp user@portal.lab.acep.uaf.edu:/opt/ckan/backups/datastore_[date].tar .\n\nInside of the ckan.ini file, set the ckan.site_url setting to the localhost url as so:\nckan.site_url = http://127.0.0.1:5000\nBuild the containers using,\n\ndocker compose up\n\nOnce the containers are up, use the import_database.sh bash script to import the database.\n\nbash import_database.sh\n\nRebuild the CKAN search index.\n\ndocker exec -it acep-ckan-cont /bin/bash\ncd /srv/app\nckan search-index rebuild\n\n\n\n\nCreate a New Extension\n\nEnter the acep-ckan-cont Docker container\n\n\ndocker exec -it acep-ckan-cont /bin/bash and run the following command\nckan generate extension -o /srv/app/src/ckan-extension This will create an extension in the ckan-extension folder which can be edited outside of the container.\n\n\nAdd the extension name to the CKAN_PLUGINS list in the .env file.\nRun docker compose up -d --build ckan\n\n\n\nInstall an Extension\n\nEnsure that the extension supports CKAN 2.10.4 and Python 3.10 Clone the extension repository into the ckan-extension folder.\nEnsure that all dependencies for the extension are listed in requirements.txt or a similar file.\nAdd the extension name to the CKAN_PLUGINS list in the .env file.\nRun docker compose up -d --build ckan\n\n\n\nUpdating the Main Site\nTo add a feature from your local instance to the main Data Catalog,\n\nPush the files to the acepportal-ckan GitHub repository.\nWait about 30 min. for the changes to be pulled to VM.\nIf you have added a new extension, ssh into the VM and add the extension name to the .env file.", + "text": "Basic Docker Commands\nList all running containers:\ndocker ps -a There are 5 containers that run the data catalog\n- `acep-ckan-cont`\n- `acep-db-cont`\n- `acep-redis-cont`\n- `acep-solr-cont`\n- `acep-datapusher-cont`\nRebuild and spin up containers:\ndocker compose up -d --build\nGo into container:\ndocker exec -it [container_nane] /bin/bash\nOr if bash is not installed in the container:\ndocker exec -it [container_nane] /bin/sh\nOr if in a bash terminal:\ndocker exec -it [container_nane] bash\nRestart a container:\ndocker restart [container_name]\n\n\nCreating a Local Instance\nCreating a local version of the data catalog is a useful tool for developing and testing new features.\n\nInstall Docker: https://www.docker.com/get-started/\n\nClone the ACEP CKAN repository from Github: https://github.com/UAF-RCS/acepportal-ckan.git\nCreate the .env file inside the main acepportal-ckan folder. Copy the contents from the .env.example file.\nSpecify the location of the source files, storage files, backups, etc. in the .env file. You will move those files to these locations in the next steps. For example:\n# CKAN Mounts Directory\nCKAN_EXTENSIONS_MOUNT=./ckan-extension\nSRC_EXTENSIONS_PATH=/srv/app/src_extensions\nCKAN_SOURCE_MOUNT=./ckan-src/src\nCKAN_STORAGE_MOUNT=./ckan-src/storage\nCKAN_INI_MOUNT=./ckan-src/ckan.ini\nTo create a replica of the current main Data Catalog, copy over the source files, storage files, ckan.ini file, and database backups from the VM. These files are located on the VM inside /opt/ckan/backups. Use scp to copy the files onto your machine. These backups are created everyday: replace [date] with the most recent date in the format yyyymmdd.\nInside of acepportal-ckan/ckan-src run the following\n\nscp user@portal.lab.acep.uaf.edu:/opt/ckan/backups/app_[date].tar.bz2 .\n\nscp user@portal.lab.acep.uaf.edu:/opt/ckan/backups/app_storage_[date].tar.bz2 .\nscp user@portal.lab.acep.uaf.edu:/opt/ckan/acepportal-ckan/ckan-src/ckan.ini\n\nUse tar to decompress the source and storage tar files\n\ntar -jxvf app_[date].tar.bz2\ntar -jxvf app_storage_[date].tar.bz2\n\nDecompressing the app_storage tar file should create a folder called ckan containing the folders resources, storage, and webassets. Rename the ckan folder to storage.\nThis should result in the directory structure specified in ckan-src/README.txt\nCreate a backups folder alongside the acepportal-ckan repository on your machine. Specify the name in the BACKUP_TO setting in the .env file.\n# Backups \nBACKUP_TO=../../[backups folder name]\nRun the following commands inside the backups folder to copy over the database and datastore.\n\nscp user@portal.lab.acep.uaf.edu:/opt/ckan/backups/ckandb_[date].tar .\nscp user@portal.lab.acep.uaf.edu:/opt/ckan/backups/datastore_[date].tar .\n\nInside of the ckan.ini file, set the ckan.site_url setting to the localhost url as so:\nckan.site_url = http://127.0.0.1:5000\nBuild the containers using,\n\ndocker compose up\n\nOnce the containers are up, use the import_database.sh bash script to import the database.\n\nbash import_database.sh\n\nRebuild the CKAN search index.\n\ndocker exec -it acep-ckan-cont /bin/bash\ncd /srv/app\nckan search-index rebuild\n\n\n\n\nCreate a New Extension\n\nEnter the acep-ckan-cont Docker container\n\n\ndocker exec -it acep-ckan-cont /bin/bash and run the following command\nckan generate extension -o /srv/app/src/ckan-extension This will create an extension in the ckan-extension folder which can be edited outside of the container.\n\n\nAdd the extension name to the CKAN_PLUGINS list in the .env file.\nRun docker compose up -d --build ckan\n\n\n\nInstall an Extension\n\nEnsure that the extension supports CKAN 2.10.4 and Python 3.10 Clone the extension repository into the ckan-extension folder.\nEnsure that all dependencies for the extension are listed in requirements.txt or a similar file.\nAdd the extension name to the CKAN_PLUGINS list in the .env file.\nRun docker compose up -d --build ckan\n\n\n\nUpdating the Main Site\nTo add a feature from your local instance to the main Data Catalog,\n\nPush the files to the acepportal-ckan GitHub repository.\nWait about 30 min. for the changes to be pulled to VM.\nIf you have added a new extension, ssh into the VM and add the extension name to the .env file.", "crumbs": [ "For Developers" ]