Skip to content

Commit

Permalink
feat: deprecate fluvio install in place of fvm (#3647)
Browse files Browse the repository at this point in the history
Removes `fluvio install` to stick with `fvm` solution.

## Example

```
Fluvio Command Line Interface

fluvio-cli [OPTIONS] <COMMAND>

Commands:
  consume       Read messages from a topic/partition
  produce       Write messages to a topic/partition
  topic         Manage and view Topics
  partition     Manage and view Partitions
  smartmodule   Create and manage SmartModules [aliases: sm]
  table-format  Create a TableFormat display specification [aliases: tf]
  hub           Work with the SmartModule Hub
  profile       Manage Profiles, which describe linked clusters
  cluster       Install or uninstall Fluvio cluster
  version       Print Fluvio version information
  completions   Generate command-line completions for Fluvio

Options:
  -c, --cluster <host:port>        Address of cluster
      --tls                        Enable TLS
      --enable-client-cert         TLS: use client cert
      --domain <DOMAIN>            Required if client cert is used
      --ca-cert <CA_CERT>          Path to TLS ca cert, required when client cert is enabled
      --client-cert <CLIENT_CERT>  Path to TLS client certificate
      --client-key <CLIENT_KEY>    Path to TLS client private key
  -P, --profile <profile>
  -h, --help                       Print help
```
  • Loading branch information
EstebanBorai committed Nov 1, 2023
1 parent d0dd859 commit f0f4968
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 296 deletions.
2 changes: 0 additions & 2 deletions crates/fluvio-cli/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ pub enum CliError {

#[error("Invalid argument: {0}")]
InvalidArg(String),
#[error("Unknown error: {0}")]
Other(String),
#[error("{0}")]
CollectedError(String),
#[error("Unexpected Infallible error")]
Expand Down
1 change: 0 additions & 1 deletion crates/fluvio-cli/src/install/mod.rs

This file was deleted.

266 changes: 0 additions & 266 deletions crates/fluvio-cli/src/install/plugins.rs

This file was deleted.

36 changes: 9 additions & 27 deletions crates/fluvio-cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,20 @@
//! CLI configurations at the top of the tree
mod error;
pub mod client;
pub mod install;
mod profile;
mod version;
mod metadata;
mod profile;
mod render;
mod version;

pub mod client;

pub(crate) mod monitoring;

// Re-exported
pub(crate) use error::CliError;

use fluvio_extension_common as common;

pub(crate) const VERSION: &str = include_str!("../../../VERSION");

// list of public export
Expand Down Expand Up @@ -52,10 +56,9 @@ mod root {
#[cfg(feature = "k8s")]
use fluvio_cluster::cli::ClusterCmd;
use fluvio_cli_common::install::fluvio_extensions_dir;
use fluvio_channel::{FLUVIO_RELEASE_CHANNEL, LATEST_CHANNEL_NAME};
use fluvio_channel::FLUVIO_RELEASE_CHANNEL;

use crate::profile::ProfileOpt;
use crate::install::plugins::InstallOpt;
use crate::client::FluvioCmd;
use crate::metadata::{MetadataOpt, subcommand_metadata};
use crate::version::VersionOpt;
Expand Down Expand Up @@ -118,16 +121,6 @@ mod root {
#[command(subcommand, name = "cluster")]
Cluster(Box<ClusterCmd>),

/// Install Fluvio plugins
///
/// The Fluvio CLI considers any executable with the prefix `fluvio-` to be a
/// CLI plugin. For example, an executable named `fluvio-foo` in your PATH may
/// be invoked by running `fluvio foo`.
///
/// This command allows you to install plugins from Fluvio's package registry.
#[command(name = "install")]
Install(InstallOpt),

/// Print Fluvio version information
#[command(name = "version")]
Version(VersionOpt),
Expand Down Expand Up @@ -171,17 +164,6 @@ mod root {
let version = semver::Version::parse(crate::VERSION).unwrap();
cluster.process(out, version, root.target).await?;
}
Self::Install(mut install) => {
if let Ok(channel_name) = std::env::var(FLUVIO_RELEASE_CHANNEL) {
println!("Current channel: {}", &channel_name);

if channel_name == LATEST_CHANNEL_NAME {
install.develop = true;
}
};

install.process().await?;
}
Self::Version(version) => {
version.process(root.target).await?;
}
Expand Down

0 comments on commit f0f4968

Please sign in to comment.