diff --git a/.github/workflows/run-ckan-only-install.yml b/.github/workflows/run-ckan-only-install.yml deleted file mode 100644 index 68ea266..0000000 --- a/.github/workflows/run-ckan-only-install.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: Verify ckan-devstaller runs CKAN-only install successfully -on: - push: - branches: - - main - paths-ignore: - - 'docs/**' - - 'README.md' - workflow_dispatch: -jobs: - ckanonlyinstall: - name: Run ckan-devstaller with a CKAN-only install - runs-on: ubuntu-22.04 - permissions: - # For the git-auto-commit-action - contents: write - steps: - - uses: actions/checkout@v4 - - name: Install Rust stable toolchain - uses: dtolnay/rust-toolchain@stable - - name: Cache cargo deps and target folder - uses: Swatinem/rust-cache@v2 - with: - workspaces: ". -> target" - - name: Run ckan-devstaller - run: cargo run --release --verbose -- --ckan-version 2.11.4 --skip-interactive --skip-run diff --git a/Cargo.lock b/Cargo.lock index 6bd3e74..fbf07de 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -126,7 +126,7 @@ checksum = "9555578bc9e57714c812a1f84e4fc5b4d21fcb063490c624de019f7464c91268" [[package]] name = "ckan-devstaller" -version = "0.3.0" +version = "0.1.0" dependencies = [ "anyhow", "clap", diff --git a/Cargo.toml b/Cargo.toml index 732c927..63bfc7a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ckan-devstaller" -version = "0.3.0" +version = "0.1.0" edition = "2024" [dependencies] diff --git a/README.md b/README.md index 762f607..72cd505 100644 --- a/README.md +++ b/README.md @@ -1,37 +1,42 @@ # ckan-devstaller -{1329F0BA-A29F-4BF8-BB6B-E3BA84FDAFCC} +`ckan-devstaller` attempts to install CKAN 2.11.3 from source using [ckan-compose](https://github.com/tino097/ckan-compose), intended for development use in a new Ubuntu 22.04 instance. The following are also installed and enabled by default: +- [DataStore extension](https://docs.ckan.org/en/2.11/maintaining/datastore.html) +- [ckanext-scheming extension](https://github.com/ckan/ckanext-scheming) +- [DataPusher+ extension](https://github.com/dathere/datapusher-plus) -`ckan-devstaller` attempts to install a [CKAN](https://ckan.org) instance using [ckan-compose](https://github.com/tino097/ckan-compose/tree/ckan-devstaller) for development usage in a new Ubuntu 22.04 instance. +[DRUF mode](https://github.com/dathere/datapusher-plus?tab=readme-ov-file#druf-dataset-resource-upload-first-workflow) is available but disabled by default. The [`datatablesview-plus` extension](https://github.com/dathere/ckanext-datatables-plus) is planned to be included in a future release. -You may find `ckan-devstaller` useful for: +## Quick start -- Exploring CKAN for the first time without spending hours on installation steps -- Developing/Testing CKAN extensions and fixing bugs -- Trying a new CKAN version to test an upgrade from a legacy version +> [!CAUTION] +> Make sure `ckan-devstaller` is run in a **new** Ubuntu 22.04 instance. Do NOT run `ckan-devstaller` in an existing instance that is important for your usage. -`ckan-devstaller` was made to help speed up the installation time for CKAN and various extensions/features to boost development productivity. +> [!WARNING] +> If you are using Ubuntu 22.04 on VirtualBox, you may need to add your user to the sudoers file before running the ckan-devstaller install script. Open a terminal in your virtual machine (VM), run `su -` and log in as the root user with the password you used to set up the VM, then type `sudo adduser sudo` where `` is your username then restart your VM and run the ckan-devstaller installer script. -**Get started at [ckan-devstaller.dathere.com](https://ckan-devstaller.dathere.com).** +> [!NOTE] +> The `/etc/ckan/default/ckan.ini` config file will have its comments removed for now. There are plans to fix this in a future release of `ckan-devstaller`. -## Learn more about developing with CKAN +> [!NOTE] +> Currently `ckan-devstaller` supports x86 architecture. ARM support is planned. -You may find the following guides useful while developing with CKAN: +You have two common options to choose from for installation. Paste one of the following scripts into your new Ubuntu 22.04 instance's terminal. -- [CKAN Hardware Requirements](https://github.com/ckan/ckan/wiki/Hardware-Requirements) - Learn what you need before installing CKAN -- [CKAN Sysadmin guide](https://docs.ckan.org/en/latest/sysadmin-guide.html) - Useful for CKAN instance administrators/sysadmins -- [CKAN Theming guide](https://docs.ckan.org/en/latest/theming/index.html) - Explore how to set up custom themes for your CKAN instance -- [CKAN Extending guide](https://docs.ckan.org/en/latest/extensions/index.html) - Develop CKAN extensions that can enhance your CKAN instance's functionality and add custom features +### Install with non-interactive mode (default config) -## What next? +```bash +wget -O - https://github.com/dathere/ckan-devstaller/releases/download/0.2.1/install.bash | bash -s default +``` -- [Customize your config file](https://docs.ckan.org/en/latest/extensions/index.html) -- [Create test data](https://docs.ckan.org/en/latest/maintaining/getting-started.html#creating-test-data) -- [Visit ckan.org](https://ckan.org) -- [Interact with your CKAN API at ckanaction.dathere.com](https://ckanaction.dathere.com) +### Install with interactive mode -## `ckan-devstaller` demos +```bash +wget -O - https://github.com/dathere/ckan-devstaller/releases/download/0.2.1/install.bash | bash +``` + +## Demos ### Interactive customizable installation diff --git a/docs/.env.example b/docs/.env.example deleted file mode 100644 index 1accae9..0000000 --- a/docs/.env.example +++ /dev/null @@ -1,2 +0,0 @@ -NEXT_TELEMETRY_DISABLED=1 -TURBO_TELEMETRY_DISABLED=1 diff --git a/docs/.gitignore b/docs/.gitignore deleted file mode 100644 index 3566783..0000000 --- a/docs/.gitignore +++ /dev/null @@ -1,30 +0,0 @@ -# deps -/node_modules - -# generated content -.contentlayer -.content-collections -.source - -# test & build -/coverage -/.next/ -/out/ -/build -*.tsbuildinfo - -# misc -.DS_Store -*.pem -/.pnp -.pnp.js -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# others -.env* -.env*.local -!.env.example -.vercel -next-env.d.ts \ No newline at end of file diff --git a/docs/.nvmrc b/docs/.nvmrc deleted file mode 100644 index b009dfb..0000000 --- a/docs/.nvmrc +++ /dev/null @@ -1 +0,0 @@ -lts/* diff --git a/docs/README.md b/docs/README.md deleted file mode 100644 index 5144394..0000000 --- a/docs/README.md +++ /dev/null @@ -1,39 +0,0 @@ -# ckan-devstaller docs website (ckan-devstaller.dathere.com) - -![Docs landing page example](./public/docs-home-example.png) - -This directory includes a Next.js project built with [Fumadocs](https://github.com/fuma-nama/fumadocs) for documentation of ckan-devstaller. The documentation can be viewed at [ckan-devstaller.dathere.com](https://ckan-devstaller.dathere.com). - -We attempt to follow the [Divio documentation system](https://docs.divio.com/documentation-system/) which primarily includes: - -- Tutorials -- How-to guides -- Explanation -- Reference - -## Development - -Run development server: - -```bash -bun dev -``` - -Open http://localhost:3000 with your browser to see the result. - -## Explore - -In the project, you can see: - -- `lib/source.ts`: Code for content source adapter, `loader()` provides the interface to access your content. -- `lib/layout.shared.tsx`: Shared options for layouts, optional but preferred to keep. - -| Route | Description | -| ------------------------- | ------------------------------------------------------ | -| `app/(home)` | The route group for your landing page and other pages. | -| `app/docs` | The documentation layout and pages. | -| `app/api/search/route.ts` | The Route Handler for search. | - -## Linting - -We use [Biome](https://biomejs.dev) for linting. We recommend you install the [biome-vscode extension](https://github.com/biomejs/biome-vscode) if you are using [VSCodium](https://vscodium.com/) or VSCode for developing the docs. diff --git a/docs/app/(home)/ckan-devstaller-demo.gif b/docs/app/(home)/ckan-devstaller-demo.gif deleted file mode 100644 index dda1cf9..0000000 Binary files a/docs/app/(home)/ckan-devstaller-demo.gif and /dev/null differ diff --git a/docs/app/(home)/layout.tsx b/docs/app/(home)/layout.tsx deleted file mode 100644 index c16b056..0000000 --- a/docs/app/(home)/layout.tsx +++ /dev/null @@ -1,6 +0,0 @@ -import { HomeLayout } from "fumadocs-ui/layouts/home"; -import { baseOptions } from "@/lib/layout.shared"; - -export default function Layout({ children }: LayoutProps<"/">) { - return {children}; -} diff --git a/docs/app/(home)/page.tsx b/docs/app/(home)/page.tsx deleted file mode 100644 index 72a91c6..0000000 --- a/docs/app/(home)/page.tsx +++ /dev/null @@ -1,415 +0,0 @@ -/** biome-ignore-all lint/suspicious/noArrayIndexKey: Would need to look into this trivial issue */ -"use client"; - -import { CodeBlock } from "fumadocs-ui/components/codeblock"; -import defaultMdxComponents from "fumadocs-ui/mdx"; -import { cn } from "fumadocs-ui/utils/cn"; -import { - BlocksIcon, - GitMergeIcon, - HomeIcon, - SailboatIcon, - TerminalIcon, - Trash2Icon, - ZapIcon, -} from "lucide-react"; -import Image from "next/image"; -import Link from "next/link"; -import { type HTMLProps, type ReactNode, useState } from "react"; -import { Pre } from "@/components/codeblock"; -import { buttonVariants } from "@/components/ui/button"; -import CkanDevstallerDemo from "./ckan-devstaller-demo.gif"; - -export default function HomePage() { - const gridColor = - "color-mix(in oklab, var(--color-fd-primary) 10%, transparent)"; - const { Card, Cards } = defaultMdxComponents; - return ( - <> -
-
-
-
- - -
-
-
- -
- - ); -} - -function Hero() { - const { Card, Cards } = defaultMdxComponents; - return ( -
-
-
-

ckan-devstaller

-

- - ckan-devstaller{" "} - - -
- Launch CKAN dev instances within minutes. -

-

- ckan-devstaller is a command-line tool to automate installing CKAN for - development using ckan-compose on a new Ubuntu 22.04 instance. -

-

- Provided by{" "} - - datHere - - . -

-
- - Get Started - - - Source Code - -
- - } href="/docs/builder" title="Quick start"> - Get started with ckan-devstaller and install CKAN within minutes - - } href="/docs/builder" title="Builder"> - Customize your installation with an interactive web GUI - - } - href="/docs/reference/installation-architecture" - title="Installation architecture" - > - Learn about where files are installed after running ckan-devstaller - - } - href="https://github.com/dathere/ckan-devstaller" - title="Source code" - > - View the source code of ckan-devstaller on GitHub - - - -
- ); -} - -function PreviewImages() { - const [active, setActive] = useState(0); - const previews = [ - { - image: CkanDevstallerDemo, - name: "Demo", - }, - ]; - - return ( -
-
- {/*
*/} - {/* {previews.map((item, i) => ( - - ))} */} -
- {previews.map((item, i) => ( - preview - ))} -
- ); -} - -function Why() { - return ( -
- -
./ckan-devstaller
- - } - codeblockUninstall={ - -
./ckan-devstaller uninstall
-
- } - /> -
- ); -} - -function WhyInteractive(props: { - codeblockInstall: ReactNode; - codeblockUninstall: ReactNode; -}) { - const [active, setActive] = useState(0); - const items = [ - [ - , - "Install CKAN within minutes", - ], - [ - , - "Customize your installation", - ], - [ - , - "Designed for developers", - ], - [ - , - "Uninstall with ease", - ], - ]; - - return ( -
-
- {items.map((item, i) => ( - - ))} -
- - -
- {active === 0 ? ( - -

- - Install CKAN within minutes. -

-

- One of the primary goals of ckan-devstaller is to ease - installation of CKAN for development. Built with Rust for speed - and streamlining installation with{" "} - - ckan-compose - - , ckan-devstaller improves installation speeds{" "} - from hours/days to just minutes depending on your - download speed. -

-
- - Get started - -
-
- ) : null} - {active === 1 ? ( - -

- - Customize your installation with the Builder. -

-

- Try out the interactive web GUI for customizing your CKAN - installation. You can select: -

-
    -
  • Presets
  • -
  • CKAN version
  • -
  • Extensions
  • -
  • Features
  • -
-

- Then you can copy the provided ckan-devstaller command to run your - selected configuration. -

-
- - Try out the Builder - -
-
- ) : null} - {active === 2 ? ( - -

- - Designed for developers. -

-

- We've kept development use cases in mind while developing - ckan-devstaller, such as: -

-
    -
  • Trying out a new version of CKAN
  • -
  • Developing CKAN extensions and themes
  • -
-
- - View the installation architecture - - - Source code - -
-
- ) : null} - {active === 3 ? ( - -

- - Uninstall CKAN with ease. -

-

- After you've installed CKAN with ckan-devstaller, you can - uninstall CKAN with ease. This allows for quickly re-installing - CKAN for a different use case. -

- {props.codeblockUninstall} - - Learn more about uninstalling - -
- ) : null} -
-
- ); -} - -function WhyPanel(props: HTMLProps) { - return ( -
- {props.children} -
- ); -} diff --git a/docs/app/api/search/route.ts b/docs/app/api/search/route.ts deleted file mode 100644 index ec6bc8d..0000000 --- a/docs/app/api/search/route.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { createFromSource } from "fumadocs-core/search/server"; -import { source } from "@/lib/source"; - -export const { GET } = createFromSource(source, { - // https://docs.orama.com/docs/orama-js/supported-languages - language: "english", -}); diff --git a/docs/app/docs/[[...slug]]/page.tsx b/docs/app/docs/[[...slug]]/page.tsx deleted file mode 100644 index 9a9b214..0000000 --- a/docs/app/docs/[[...slug]]/page.tsx +++ /dev/null @@ -1,54 +0,0 @@ -import { createRelativeLink } from "fumadocs-ui/mdx"; -import { - DocsBody, - DocsDescription, - DocsPage, - DocsTitle, -} from "fumadocs-ui/page"; -import type { Metadata } from "next"; -import { notFound } from "next/navigation"; -import { getPageImage, source } from "@/lib/source"; -import { getMDXComponents } from "@/mdx-components"; - -export default async function Page(props: PageProps<"/docs/[[...slug]]">) { - const params = await props.params; - const page = source.getPage(params.slug); - if (!page) notFound(); - - const MDX = page.data.body; - - return ( - - {page.data.title} - {page.data.description} - - - - - ); -} - -export async function generateStaticParams() { - return source.generateParams(); -} - -export async function generateMetadata( - props: PageProps<"/docs/[[...slug]]">, -): Promise { - const params = await props.params; - const page = source.getPage(params.slug); - if (!page) notFound(); - - return { - title: page.data.title, - description: page.data.description, - openGraph: { - images: getPageImage(page).url, - }, - }; -} diff --git a/docs/app/docs/layout.tsx b/docs/app/docs/layout.tsx deleted file mode 100644 index 2d250d0..0000000 --- a/docs/app/docs/layout.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import { DocsLayout } from "fumadocs-ui/layouts/docs"; -import { baseOptions } from "@/lib/layout.shared"; -import { source } from "@/lib/source"; - -export default function Layout({ children }: LayoutProps<"/docs">) { - return ( - - {children} - - ); -} diff --git a/docs/app/favicon.ico b/docs/app/favicon.ico deleted file mode 100644 index e92b746..0000000 Binary files a/docs/app/favicon.ico and /dev/null differ diff --git a/docs/app/global.css b/docs/app/global.css deleted file mode 100644 index b6836ec..0000000 --- a/docs/app/global.css +++ /dev/null @@ -1,5 +0,0 @@ -@import "tailwindcss"; -@import "fumadocs-ui/css/neutral.css"; -@import "fumadocs-ui/css/ocean.css"; -@import "fumadocs-ui/css/preset.css"; -@import "tw-animate-css"; \ No newline at end of file diff --git a/docs/app/layout.tsx b/docs/app/layout.tsx deleted file mode 100644 index 9d8e16f..0000000 --- a/docs/app/layout.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import "@/app/global.css"; -import { RootProvider } from "fumadocs-ui/provider"; -import localFont from "next/font/local"; -import Script from "next/script"; -import { Toaster } from "@/components/ui/sonner"; - -const inter = localFont({ src: "../lib/inter.ttf" }); - -export default function Layout({ children }: LayoutProps<"/">) { - return ( - - - {children} -