Skip to content

Commit

Permalink
Replace CodeReady Containers to CRC
Browse files Browse the repository at this point in the history
This PR replace CodeReady Containers to CRC in cmd, pkg, images
directories and also update the README.
  • Loading branch information
praveenkumar authored and gbraad committed Apr 21, 2022
1 parent 609ecb2 commit 6ef156b
Show file tree
Hide file tree
Showing 22 changed files with 49 additions and 49 deletions.
20 changes: 10 additions & 10 deletions README.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
= Red Hat CodeReady Containers - OpenShift 4 on your Laptop
= CRC - OpenShift 4 on your Laptop
:icons:
:toc: macro
:toc-title:
Expand All @@ -20,9 +20,9 @@ If you are looking for a solution for running OpenShift 3.x, you will need tools
[[usage-data]]
== Usage data

The first time CodeReady Containers is run, you will be asked to opt-in to Red Hat's telemetry collection program.
The first time CRC is run, you will be asked to opt-in to Red Hat's telemetry collection program.

With your approval, CodeReady Containers collects pseudonymized usage data and sends it to Red Hat servers to help improve our products and services. Read our https://developers.redhat.com/article/tool-data-collection[privacy statement] to learn more about it. For the specific data points being collected, see xref:usage-data.adoc#data-table[Usage data].
With your approval, CRC collects pseudonymized usage data and sends it to Red Hat servers to help improve our products and services. Read our https://developers.redhat.com/article/tool-data-collection[privacy statement] to learn more about it. For the specific data points being collected, see xref:usage-data.adoc#data-table[Usage data].

=== Manually configuring usage data collection

Expand All @@ -32,15 +32,15 @@ You can manually change your preference about usage data collection by running `
[[documentation]]
== Documentation

=== Getting CodeReady Containers
=== Getting CRC

CodeReady Containers binaries with an embedded OpenShift disk image can be downloaded from link:https://cloud.redhat.com/openshift/create/local[this page].
CRC binaries with an embedded OpenShift disk image can be downloaded from link:https://cloud.redhat.com/openshift/create/local[this page].

=== Using CodeReady Containers
=== Using CRC

The documentation for CodeReady Containers is currently hosted by GitHub Pages.
The documentation for CRC is currently hosted by GitHub Pages.

See the link:https://code-ready.github.io/crc/[Red Hat CodeReady Containers Getting Started Guide].
See the link:https://code-ready.github.io/crc/[CRC Getting Started Guide].

=== Building the documentation

Expand All @@ -56,9 +56,9 @@ $ make build_docs

This will create a [filename]`docs/build/master.html` file which you can view in your browser.

=== Developing CodeReady Containers
=== Developing CRC

Developers who want to work on CodeReady Containers should visit the link:./developing.adoc[Developing CodeReady Containers] document.
Developers who want to work on CRC should visit the link:./developing.adoc[Developing CRC] document.

[[community]]
== Community
Expand Down
2 changes: 1 addition & 1 deletion cmd/crc/cmd/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ package cmd
const (
commandName = "crc"
descriptionShort = "Local OpenShift 4.x cluster"
descriptionLong = "CodeReady Containers is a tool that manages a local OpenShift 4.x cluster optimized for testing and development purposes"
descriptionLong = "CRC is a tool that manages a local OpenShift 4.x cluster optimized for testing and development purposes"
)
2 changes: 1 addition & 1 deletion cmd/crc/cmd/daemon_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func checkIfDaemonIsRunning() (bool, error) {

func daemonNotRunningMessage() string {
if crcversion.IsInstaller() {
return "Is CodeReady Containers tray application running? Cannot reach daemon API"
return "Is CRC tray application running? Cannot reach daemon API"
}
return genericDaemonNotRunningMessage
}
Expand Down
8 changes: 4 additions & 4 deletions cmd/crc/cmd/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ func init() {

var setupCmd = &cobra.Command{
Use: "setup",
Short: "Set up prerequisites for using CodeReady Containers",
Long: "Set up local virtualization and networking infrastructure for using CodeReady Containers",
Short: "Set up prerequisites for using CRC",
Long: "Set up local virtualization and networking infrastructure for using CRC",
RunE: func(cmd *cobra.Command, args []string) error {
if err := viper.BindFlagSet(cmd.Flags()); err != nil {
return err
Expand All @@ -42,7 +42,7 @@ var setupCmd = &cobra.Command{

func runSetup(arguments []string) error {
if config.Get(crcConfig.ConsentTelemetry).AsString() == "" {
fmt.Println("CodeReady Containers is constantly improving and we would like to know more about usage (more details at https://developers.redhat.com/article/tool-data-collection)")
fmt.Println("CRC is constantly improving and we would like to know more about usage (more details at https://developers.redhat.com/article/tool-data-collection)")
fmt.Println("Your preference can be changed manually if desired using 'crc config set consent-telemetry <yes/no>'")
if input.PromptUserForYesOrNo("Would you like to contribute anonymous usage statistics", false) {
if _, err := config.Set(crcConfig.ConsentTelemetry, "yes"); err != nil {
Expand Down Expand Up @@ -86,7 +86,7 @@ func (s *setupResult) prettyPrintTo(writer io.Writer) error {
if s.Error != nil {
return s.Error
}
_, err := fmt.Fprintln(writer, "Your system is correctly setup for using CodeReady Containers. "+
_, err := fmt.Fprintln(writer, "Your system is correctly setup for using CRC. "+
"Use 'crc start' to start the instance")
return err
}
2 changes: 1 addition & 1 deletion cmd/crc/cmd/setup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ func TestSetupRenderActionPlainSuccess(t *testing.T) {
assert.NoError(t, render(&setupResult{
Success: true,
}, out, ""))
assert.Equal(t, "Your system is correctly setup for using CodeReady Containers. Use 'crc start' to start the instance\n", out.String())
assert.Equal(t, "Your system is correctly setup for using CRC. Use 'crc start' to start the instance\n", out.String())
}

func TestSetupRenderActionPlainFailure(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/crc/cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func (v *version) prettyPrintTo(writer io.Writer) error {

func (v *version) lines() []string {
return []string{
fmt.Sprintf("CodeReady Containers version: %s+%s\n", v.Version, v.Commit),
fmt.Sprintf("CRC version: %s+%s\n", v.Version, v.Commit),
fmt.Sprintf("OpenShift version: %s\n", v.OpenshiftVersion),
fmt.Sprintf("Podman version: %s\n", v.PodmanVersion),
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/crc/cmd/version_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func TestPlainVersion(t *testing.T) {
OpenshiftVersion: "4.5.4",
PodmanVersion: "3.4.4",
}, ""))
assert.Equal(t, `CodeReady Containers version: 1.13+aabbcc
assert.Equal(t, `CRC version: 1.13+aabbcc
OpenShift version: 4.5.4
Podman version: 3.4.4
`, out.String())
Expand Down
2 changes: 1 addition & 1 deletion images/build-e2e/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ RUN make build_e2e

FROM registry.access.redhat.com/ubi8/ubi-minimal

LABEL MAINTAINER "CodeReady Containers <devtools-cdk@redhat.com>"
LABEL MAINTAINER "CRC <devtools-cdk@redhat.com>"

COPY --from=builder /workspace/images/build-e2e/entrypoint.sh /usr/local/bin/
COPY --from=builder /workspace/out /opt/crc/bin
Expand Down
2 changes: 1 addition & 1 deletion images/build-integration/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ RUN make build_integration

FROM registry.access.redhat.com/ubi8/ubi-minimal

LABEL MAINTAINER "CodeReady Containers <devtools-cdk@redhat.com>"
LABEL MAINTAINER "CRC <devtools-cdk@redhat.com>"

COPY --from=builder /workspace/images/build-integration/entrypoint.sh /usr/local/bin/
COPY --from=builder /workspace/out /opt/crc/bin
Expand Down
2 changes: 1 addition & 1 deletion images/build/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM registry.access.redhat.com/ubi8/go-toolset:1.14.12
MAINTAINER CodeReady Containers <devtools-cdk@redhat.com>
MAINTAINER CRC <devtools-cdk@redhat.com>

WORKDIR $APP_ROOT/src
COPY . .
2 changes: 1 addition & 1 deletion images/dnsmasq/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM registry.access.redhat.com/ubi8/ubi
MAINTAINER CodeReady Containers <devtools-cdk@redhat.com>
MAINTAINER CRC <devtools-cdk@redhat.com>

RUN yum -y install dnsmasq && \
yum clean all
Expand Down
2 changes: 1 addition & 1 deletion images/docs-builder/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM registry.access.redhat.com/ubi8/ubi
MAINTAINER CodeReady Containers <devtools-cdk@redhat.com>
MAINTAINER CRC <devtools-cdk@redhat.com>

RUN yum update -y && \
yum install --setopt=tsflags=nodocs -y \
Expand Down
4 changes: 2 additions & 2 deletions images/squid/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

# Intermediate build image to generate the CA and certificate used for https
FROM registry.centos.org/centos/centos:centos8 AS gencerts
MAINTAINER CodeReady Containers <devtools-cdk@redhat.com>
MAINTAINER CRC <devtools-cdk@redhat.com>

RUN yum -y install openssl

Expand All @@ -42,7 +42,7 @@ RUN bash ./generate-certs.sh

# Final squid container
FROM registry.centos.org/centos/centos:centos8
MAINTAINER CodeReady Containers <devtools-cdk@redhat.com>
MAINTAINER CRC <devtools-cdk@redhat.com>

RUN yum -y install squid && \
yum clean all
Expand Down
2 changes: 1 addition & 1 deletion pkg/crc/cluster/pullsecret.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ func loadFile(path string) (string, error) {
return pullsecret, validation.ImagePullSecret(pullsecret)
}

const helpMessage = `CodeReady Containers requires a pull secret to download content from Red Hat.
const helpMessage = `CRC requires a pull secret to download content from Red Hat.
You can copy it from the Pull Secret section of %s.
`

Expand Down
2 changes: 1 addition & 1 deletion pkg/crc/config/settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func RegisterSettings(cfg *Config) {
}

cfg.AddSetting(HostNetworkAccess, false, validateHostNetworkAccess, SuccessfullyApplied,
"Allow TCP/IP connections from the CodeReady Containers VM to services running on the host (true/false, default: false)")
"Allow TCP/IP connections from the CRC VM to services running on the host (true/false, default: false)")
// Proxy Configuration
cfg.AddSetting(HTTPProxy, "", ValidateHTTPProxy, SuccessfullyApplied,
"HTTP proxy URL (string, like 'http://my-proxy.com:8443')")
Expand Down
2 changes: 1 addition & 1 deletion pkg/crc/machine/machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func getClusterConfig(bundleInfo *bundle.CrcBundleInfo) (*types.ClusterConfig, e
func getBundleMetadataFromDriver(driver drivers.Driver) (*bundle.CrcBundleInfo, error) {
bundleName, err := driver.GetBundleName()
if err != nil {
err := fmt.Errorf("Error getting bundle name from CodeReady Containers instance, make sure you ran 'crc setup' and are using the latest bundle")
err := fmt.Errorf("Error getting bundle name from CRC instance, make sure you ran 'crc setup' and are using the latest bundle")
return nil, err
}
metadata, err := bundle.Get(bundleName)
Expand Down
20 changes: 10 additions & 10 deletions pkg/crc/machine/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,9 @@ func (client *client) Start(ctx context.Context, startConfig types.StartConfig)
}

if crcBundleMetadata.IsOpenShift() {
logging.Infof("Creating CodeReady Containers VM for OpenShift %s...", crcBundleMetadata.GetOpenshiftVersion())
logging.Infof("Creating CRC VM for OpenShift %s...", crcBundleMetadata.GetOpenshiftVersion())
} else {
logging.Infof("Creating CodeReady Containers VM for Podman %s...", crcBundleMetadata.GetPodmanVersion())
logging.Infof("Creating CRC VM for Podman %s...", crcBundleMetadata.GetPodmanVersion())
}

machineConfig := config.MachineConfig{
Expand Down Expand Up @@ -218,12 +218,12 @@ func (client *client) Start(ctx context.Context, startConfig types.StartConfig)
}
if vmState == state.Running {
if !vm.bundle.IsOpenShift() {
logging.Infof("A CodeReady Containers VM for Podman %s is already running", vm.bundle.GetPodmanVersion())
logging.Infof("A CRC VM for Podman %s is already running", vm.bundle.GetPodmanVersion())
return &types.StartResult{
Status: vmState,
}, nil
}
logging.Infof("A CodeReady Containers VM for OpenShift %s is already running", vm.bundle.GetOpenshiftVersion())
logging.Infof("A CRC VM for OpenShift %s is already running", vm.bundle.GetOpenshiftVersion())
clusterConfig, err := getClusterConfig(vm.bundle)
if err != nil {
return nil, errors.Wrap(err, "Cannot create cluster configuration")
Expand All @@ -242,7 +242,7 @@ func (client *client) Start(ctx context.Context, startConfig types.StartConfig)
}

if vm.bundle.IsOpenShift() {
logging.Infof("Starting CodeReady Containers VM for OpenShift %s...", vm.bundle.GetOpenshiftVersion())
logging.Infof("Starting CRC VM for OpenShift %s...", vm.bundle.GetOpenshiftVersion())
}

if client.useVSock() {
Expand All @@ -265,14 +265,14 @@ func (client *client) Start(ctx context.Context, startConfig types.StartConfig)
return nil, errors.Wrap(err, "Error getting the state")
}
if vmState != state.Running {
return nil, errors.Wrap(err, "CodeReady Containers VM is not running")
return nil, errors.Wrap(err, "CRC VM is not running")
}

instanceIP, err := vm.IP()
if err != nil {
return nil, errors.Wrap(err, "Error getting the IP")
}
logging.Infof("CodeReady Containers instance is running with IP %s", instanceIP)
logging.Infof("CRC instance is running with IP %s", instanceIP)
sshRunner, err := vm.SSHRunner()
if err != nil {
return nil, errors.Wrap(err, "Error creating the ssh client")
Expand All @@ -283,7 +283,7 @@ func (client *client) Start(ctx context.Context, startConfig types.StartConfig)
if err := sshRunner.WaitForConnectivity(ctx, 300*time.Second); err != nil {
return nil, errors.Wrap(err, "Failed to connect to the CRC VM with SSH -- virtual machine might be unreachable")
}
logging.Info("CodeReady Containers VM is running")
logging.Info("CRC VM is running")

// Post VM start immediately update SSH key and copy kubeconfig to instance
// dir and VM
Expand All @@ -298,7 +298,7 @@ func (client *client) Start(ctx context.Context, startConfig types.StartConfig)

// Start network time synchronization if `CRC_DEBUG_ENABLE_STOP_NTP` is not set
if stopNtp, _ := strconv.ParseBool(os.Getenv("CRC_DEBUG_ENABLE_STOP_NTP")); stopNtp {
logging.Info("Stopping network time synchronization in CodeReady Containers VM")
logging.Info("Stopping network time synchronization in CRC VM")
if _, _, err := sshRunner.RunPrivileged("Turning off the ntp server", "timedatectl set-ntp off"); err != nil {
return nil, errors.Wrap(err, "Failed to stop network time synchronization")
}
Expand Down Expand Up @@ -407,7 +407,7 @@ func (client *client) Start(ctx context.Context, startConfig types.StartConfig)

if err := cluster.ApproveCSRAndWaitForCertsRenewal(ctx, sshRunner, ocConfig, certsExpired[cluster.KubeletClientCert], certsExpired[cluster.KubeletServerCert]); err != nil {
logBundleDate(vm.bundle)
return nil, errors.Wrap(err, "Failed to renew TLS certificates: please check if a newer CodeReady Containers release is available")
return nil, errors.Wrap(err, "Failed to renew TLS certificates: please check if a newer CRC release is available")
}

if err := cluster.WaitForAPIServer(ctx, ocConfig); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/crc/preflight/preflight_checks_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const (
func checkM1CPU() error {
if strings.HasPrefix(cpuid.CPU.BrandName, "VirtualApple") {
logging.Debugf("Running with an emulated x86_64 CPU")
return fmt.Errorf("CodeReady Containers is unsupported on Apple M1 hardware")
return fmt.Errorf("CRC is unsupported on Apple M1 hardware")
}

return nil
Expand Down
10 changes: 5 additions & 5 deletions pkg/crc/preflight/preflight_checks_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func checkRunningInsideWSL2() error {

if strings.Contains(string(version), "Microsoft") {
logging.Debugf("Running inside WSL2 environment")
return fmt.Errorf("CodeReady Containers is unsupported using WSL2")
return fmt.Errorf("CRC is unsupported using WSL2")
}

return nil
Expand Down Expand Up @@ -286,7 +286,7 @@ func systemdUnitRunning(sd *systemd.Commander, unitName string) bool {
const (
vsockUnitName = "crc-vsock.socket"
vsockUnit = `[Unit]
Description=CodeReady Containers vsock socket
Description=CRC vsock socket
[Socket]
ListenStream=vsock::1024
Expand All @@ -298,7 +298,7 @@ WantedBy=default.target

httpUnitName = "crc-http.socket"
httpUnit = `[Unit]
Description=CodeReady Containers HTTP socket
Description=CRC HTTP socket
[Socket]
ListenStream=%h/.crc/crc-http.sock
Expand All @@ -311,7 +311,7 @@ WantedBy=default.target
daemonUnitName = "crc-daemon.service"
daemonUnitTemplate = `
[Unit]
Description=CodeReady Containers daemon
Description=CRC daemon
Requires=crc-http.socket
Requires=crc-vsock.socket
Expand Down Expand Up @@ -433,7 +433,7 @@ func removeDaemonSystemdService() error {

func warnNoDaemonAutostart() error {
// only purpose of this check is to trigger a warning for RHEL7/CentOS7 users
logging.Warnf("systemd --user is not available, crc daemon won't be autostarted and must be run manually before using CodeReady Containers")
logging.Warnf("systemd --user is not available, crc daemon won't be autostarted and must be run manually before using CRC")
return nil
}

Expand Down
4 changes: 2 additions & 2 deletions pkg/crc/preflight/preflight_checks_nonwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func genericPreflightChecks(preset crcpreset.Preset) []Check {
configKeySuffix: "check-supported-cpu-arch",
checkDescription: "Checking if running on a supported CPU architecture",
check: checkSupportedCPUArch,
fixDescription: "CodeReady Containers is only supported on x86_64 hardware",
fixDescription: "CRC is only supported on x86_64 hardware",
flags: NoFix,

labels: None,
Expand Down Expand Up @@ -194,7 +194,7 @@ func fixOldAdminHelperExecutableCached() error {
func checkSupportedCPUArch() error {
if runtime.GOARCH != "amd64" {
logging.Debugf("GOARCH is %s", runtime.GOARCH)
return fmt.Errorf("CodeReady Containers can only run on x86_64 CPUs")
return fmt.Errorf("CRC can only run on x86_64 CPUs")
}
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/crc/preflight/preflight_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func hyperkitPreflightChecks(networkMode network.Mode) []Check {
configKeySuffix: "check-m1-cpu",
checkDescription: "Checking if running emulated on a M1 CPU",
check: checkM1CPU,
fixDescription: "CodeReady Containers is unsupported on Apple M1 hardware",
fixDescription: "CRC is unsupported on Apple M1 hardware",
flags: NoFix,

labels: labels{Os: Darwin},
Expand Down
2 changes: 1 addition & 1 deletion pkg/crc/preflight/preflight_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ var wsl2PreflightCheck = Check{
configKeySuffix: "check-wsl2",
checkDescription: "Checking if running inside WSL2",
check: checkRunningInsideWSL2,
fixDescription: "CodeReady Containers is unsupported using WSL2",
fixDescription: "CRC is unsupported using WSL2",
flags: NoFix,

labels: labels{Os: Linux},
Expand Down

0 comments on commit 6ef156b

Please sign in to comment.