mirror of
https://github.com/dathere/ckan-devstaller.git
synced 2025-11-09 13:39:49 +00:00
feat: update to 0.3.0, remove --default, add --skip-interactive
This commit is contained in:
parent
4808647cea
commit
1c0f3c2e15
5 changed files with 24 additions and 45 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
|
@ -126,7 +126,7 @@ checksum = "9555578bc9e57714c812a1f84e4fc5b4d21fcb063490c624de019f7464c91268"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ckan-devstaller"
|
name = "ckan-devstaller"
|
||||||
version = "0.1.0"
|
version = "0.3.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"clap",
|
"clap",
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "ckan-devstaller"
|
name = "ckan-devstaller"
|
||||||
version = "0.1.0"
|
version = "0.3.0"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|
|
||||||
34
README.md
34
README.md
|
|
@ -1,40 +1,12 @@
|
||||||
# ckan-devstaller
|
# ckan-devstaller
|
||||||
|
|
||||||
`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:
|
`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.
|
||||||
|
|
||||||
- [DataStore extension](https://docs.ckan.org/en/2.11/maintaining/datastore.html)
|
Get started at [ckan-devstaller.dathere.com](https://ckan-devstaller.dathere.com).
|
||||||
- [ckanext-scheming extension](https://github.com/ckan/ckanext-scheming)
|
|
||||||
- [DataPusher+ extension](https://github.com/dathere/datapusher-plus)
|
|
||||||
|
|
||||||
[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.
|
|
||||||
|
|
||||||
## Quick start
|
## Quick start
|
||||||
|
|
||||||
> [!CAUTION]
|
Please visit [ckan-devstaller.dathere.com/docs/quick-start](https://ckan-devstaller.dathere.com/docs/quick-start) for how to get started with ckan-devstaller.
|
||||||
> 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.
|
|
||||||
|
|
||||||
> [!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 <username> sudo` where `<username>` is your username then restart your VM and run the ckan-devstaller installer script.
|
|
||||||
|
|
||||||
> [!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`.
|
|
||||||
|
|
||||||
> [!NOTE]
|
|
||||||
> Currently `ckan-devstaller` supports x86 architecture. ARM support is planned.
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
### Install with non-interactive mode (default config)
|
|
||||||
|
|
||||||
```bash
|
|
||||||
wget -O - https://github.com/dathere/ckan-devstaller/releases/download/0.2.1/install.bash | bash -s default
|
|
||||||
```
|
|
||||||
|
|
||||||
### Install with interactive mode
|
|
||||||
|
|
||||||
```bash
|
|
||||||
wget -O - https://github.com/dathere/ckan-devstaller/releases/download/0.2.1/install.bash | bash
|
|
||||||
```
|
|
||||||
|
|
||||||
## Demos
|
## Demos
|
||||||
|
|
||||||
|
|
|
||||||
23
install.bash
23
install.bash
|
|
@ -11,18 +11,25 @@ sudo apt install curl -y
|
||||||
cd ~/
|
cd ~/
|
||||||
|
|
||||||
# Download the ckan-devstaller binary file
|
# Download the ckan-devstaller binary file
|
||||||
curl -LO https://github.com/dathere/ckan-devstaller/releases/download/0.2.1/ckan-devstaller
|
curl -LO https://github.com/dathere/ckan-devstaller/releases/download/0.3.0/ckan-devstaller
|
||||||
|
|
||||||
# Add execute permission to ckan-devstaller binary file
|
# Add execute permission to ckan-devstaller binary file
|
||||||
sudo chmod +x ./ckan-devstaller
|
sudo chmod +x ./ckan-devstaller
|
||||||
|
|
||||||
# Run the ckan-devstaller binary file
|
# Run the ckan-devstaller binary file with the specified preset and (non-)interactive mode
|
||||||
# If the user provides an argument "default", run ckan-devstaller in non-interactive mode with the default config
|
preset=$1
|
||||||
# Otherwise run ckan-devstaller in interactive mode
|
skip_interactive=$2
|
||||||
flag=$1
|
|
||||||
|
|
||||||
if [ $flag == "default" ]; then
|
if [ $preset == "dathere-default" ]; then
|
||||||
./ckan-devstaller --default
|
if [ $skip_interactive == "skip-interactive" ]; then
|
||||||
|
./ckan-devstaller --ckan-version 2.11.3 --extensions ckanext-scheming DataStore DataPusher+ --features enable-ssh --skip-interactive
|
||||||
|
else
|
||||||
|
./ckan-devstaller --ckan-version 2.11.3 --extensions ckanext-scheming DataStore DataPusher+ --features enable-ssh
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
./ckan-devstaller
|
if [ $preset == "skip-interactive" ]; then
|
||||||
|
./ckan-devstaller --skip-interactive
|
||||||
|
else
|
||||||
|
./ckan-devstaller
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -23,9 +23,9 @@ use xshell_venv::{Shell, VirtualEnv};
|
||||||
#[derive(Parser)]
|
#[derive(Parser)]
|
||||||
#[command(version, about, long_about = None)]
|
#[command(version, about, long_about = None)]
|
||||||
struct Args {
|
struct Args {
|
||||||
/// Skip interactive steps and install the CKAN-only preset
|
/// Skip interactive steps
|
||||||
#[arg(short, long)]
|
#[arg(short, long)]
|
||||||
default: bool,
|
skip_interactive: bool,
|
||||||
#[arg(short, long)]
|
#[arg(short, long)]
|
||||||
/// CKAN version to install defined by semantic versioning from official releases from https://github.com/ckan/ckan
|
/// CKAN version to install defined by semantic versioning from official releases from https://github.com/ckan/ckan
|
||||||
ckan_version: Option<String>,
|
ckan_version: Option<String>,
|
||||||
|
|
@ -146,7 +146,7 @@ rm -rf README ckan-compose ahoy dpp_default_config.ini get-docker.sh permissions
|
||||||
default_config_text.push_str("\n- Disable DRUF mode for DataPusher+");
|
default_config_text.push_str("\n- Disable DRUF mode for DataPusher+");
|
||||||
}
|
}
|
||||||
println!("{default_config_text}");
|
println!("{default_config_text}");
|
||||||
let answer_customize = if args.default {
|
let answer_customize = if args.skip_interactive {
|
||||||
false
|
false
|
||||||
} else {
|
} else {
|
||||||
Confirm::new("Would you like to customize the configuration for your CKAN installation?")
|
Confirm::new("Would you like to customize the configuration for your CKAN installation?")
|
||||||
|
|
@ -186,7 +186,7 @@ rm -rf README ckan-compose ahoy dpp_default_config.ini get-docker.sh permissions
|
||||||
config
|
config
|
||||||
};
|
};
|
||||||
|
|
||||||
let begin_installation = if args.default {
|
let begin_installation = if args.skip_interactive {
|
||||||
true
|
true
|
||||||
} else {
|
} else {
|
||||||
Confirm::new("Would you like to begin the installation?").prompt()?
|
Confirm::new("Would you like to begin the installation?").prompt()?
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue